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

Notification

Icon
Error

NCrunch build failure after adding Microsoft.Net.Compilers package.
AndyLowry
#1 Posted : Sunday, September 27, 2015 1:29:29 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/4/2012(UTC)
Posts: 9
Location: United Kingdom

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
Hi,

I've added Microsoft.Net.Compilers nuget package to a project so that it will build on our Build agents, however now NCrunch can't build the project giving the following error message:

..\..\..\packages\Microsoft.Net.Compilers.1.0.0\tools\Microsoft.CSharp.Core.targets (67, 5): The specified task executable "csc.exe" could not be run. Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.



I've tried with the Allow Code Analysis option turned off and on,but this makes no difference. I suspect the Compilers package is interfering with Ncrunch's mechanism for building.

Any suggestions on how to solve this? I'd rather not remove the Compilers package if we can avoid it.

Thanks

Andy
Remco
#2 Posted : Sunday, September 27, 2015 9:04:04 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 Andy,

This is most likely caused by an implicit dependency on the compiler resources inside the NuGet package - http://www.ncrunch.net/documentation/considerations-and-constraints_implicit-file-dependencies.

Including the Microsoft.Net.Compilers.1.0.0 directory using NCrunch's 'Additional files to include' should resolve the problem.
AndyLowry
#3 Posted : Monday, September 28, 2015 9:24:22 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/4/2012(UTC)
Posts: 9
Location: United Kingdom

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
Hi Remco,

Thanks, I managed to get it to work. I had to add the package to the additional folders at the Solution level. Adding only at the project level didn't work.

Thanks for your help.

Andy
AlSki
#4 Posted : Tuesday, June 28, 2016 1:30:57 PM(UTC)
Rank: Member

Groups: Registered
Joined: 2/28/2012(UTC)
Posts: 17
Location: London

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Had the same problem, moving from directory level "Additional folder" to solution level has fixed it.
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.030 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download