0

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)'?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Anthony Bias
  • 515
  • 3
  • 20

1 Answers1

0

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.

Anthony Bias
  • 515
  • 3
  • 20