Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

fail to compile
Henrry
#1 Posted : Friday, July 21, 2017 8:25:19 AM(UTC)
Rank: Member

Groups: Registered
Joined: 1/12/2017(UTC)
Posts: 18
Location: United Kingdom

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
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
Remco
#2 Posted : Friday, July 21, 2017 12:56:02 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
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'))" />
1 user thanked Remco for this useful post.
Henrry on 7/25/2017(UTC)
Henrry
#3 Posted : Tuesday, July 25, 2017 7:47:20 AM(UTC)
Rank: Member

Groups: Registered
Joined: 1/12/2017(UTC)
Posts: 18
Location: United Kingdom

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
The second options worked

thanks
1 user thanked Henrry for this useful post.
Remco on 7/25/2017(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.022 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download