Build/Test Issues

fail to compile

Started by Henrry on 4,780 views

Hi

my project has this in the csproj file

<Error Condition="!Exists('..\..\..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props'))" />

in my solution it works fine but ncrunch fail to compile because the package folder does not exists in ncrunch workspace

what can i do?

tks
Hi,

You have a couple of options here. The first is to try including the package into the workspace by adding it to the 'Additional files to include' NCrunch project-level configuration setting.

The second option is to add an extra condition to the error so that it doesn't fire under NCrunch, for example:

<Error Condition="!Exists('..\..\..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props') and '$(NCrunch)' != '1'" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props'))" />
The second options worked

thanks

Post a reply

Log in to reply.