Is there a C# preprocessor directive for Rider?

Is there a preprocessor directive for Rider, to distinguish C# in Rider vs Visual Studio?  If not, how do you define a symbol at the project or solution (not module) level?


1 comment
Comment actions Permalink

Hello Martin Joel


If you want to check if the project is currently loaded in Rider via your .csproj file, try checking an environment variables: $(RESHARPER_FRONT_PRODUCT_CODE) == 'RD' , or $(BuildingByReSharper) == 'True' (which would also be true for ReSharper build in Visual Studio).


If you're looking for something else, could you describe your use case in detail?


Please sign in to leave a comment.