A project I'm working on has a csproj file with Pre/Post build events that only run when its being built in Visual Studio. It looks like this:
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(BuildingInsideVisualStudio)' == 'true' ">
<!-- Pre build stuff -->
</Target>
Is there an equivalent condition for when a project is being built inside Rider, something like '$(BuildingInsideRider)'
?
I reached out to Jetbrains support with the same question, and they told me the property name is '$(BuildingByReSharper)'
. It's also worth noting that it's only useable in Rider 2021.1.3 and newer.