[1723]Incorrect Rename refactoring
Hello,
i just tried to rename a property in a project which uses conditional compiles. The rename fails for occurences inside an active conditional block. I'm working with VB and Visual Studio 2010. Here is a sample:
#If MyCondition Then
myVariable = myPropertyToReanme
#End If
In the project properties myCondition is defined in the custom constants as "myCondition=-1" and the block will be compiled. R# seems to ignore the conditional blocks.
Regards
Klaus
Please sign in to leave a comment.
Hello Klaus,
ReSharper expects MyCondition to be either 'true' or 'false'. It looks like
VB.NET compiler treats any non-zero value as 'true', so I've created a bug-report:
http://youtrack.jetbrains.net/issue/RSRP-185901 and you can monitor it's
status. Meanwhile, you can define MyCondition = true as a workaround.
Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"