Build/Test Issues

NCrunch build failure after adding Microsoft.Net.Compilers package.

Started by AndyLowry on 9,451 views

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
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
Had the same problem, moving from directory level "Additional folder" to solution level has fixed it.

Post a reply

Log in to reply.