Search code examples
c#msbuildrider

Rider isn't setting my msbuild variable BuildingInsideVisualStudio


My msbuild script is not executing according to plan. For some reason, one of my variables isn't resolving to anything, but it's a standard variable.

In the log:

Task "ResolveNonMSBuildProjectOutput" skipped, due to false condition;
('$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!='') 
was evaluated as (''=='true' and ''!='').

Notice that the $(BuildingInsideVisualStudio) seems to resolve to an empty string.

In Rider (version 2017.3), I right-click the project -> properties -> under the Diagnostic section there is an option for properties. In this view, are all the project variables, including BuildingInsideVisualStudio, which is set to True.

What do I need to look at to ensure Rider is setting this variable when I build from inside the IDE?

Edit: PS: I have also tried BuildingByReSharper, which also didn't work. And, my co-workers using Rider are not having this issue.


Solution

  • The workaround is using ReSharper's Build Engine, instead of MSBuild for those properties to be respected:

    enter image description here