Build/Test Issues

Missing (non used) nuget package

Started by Henrry on 6,361 views

Hi

NCrunch is failing to build because a nuget package that i am not using. I don't have it in my project
Here is the error message

NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/documentation/troubleshooting_project-build-issues
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props.


Any ideas or suggestions?


Thanks
Henrry
Hi Henrry,

Thanks for sharing this issue.

This message is the standard message kicked up by Nuget's MSBuild task when it detects that a package is missing. If the package also doesn't exist anywhere in your foreground solution, then in theory you should be seeing the same message when you try to build using Visual Studio.

I'd suggest taking a look at the workspace generated by NCrunch to build this project. Right click on the failed build in the NCrunch Tests Window, then go to Advanced->Browse to workspace. You should see a generated set of folders with a project file. Try running MSBuild.exe against this project file and see what result you get. NCrunch essentially does the same thing (running MSBuild against the file), and you can freely change things in the workspace to help understand why this package is being referenced. There may be something in the foreground project that you can change to disable or remove the reference.
That project that you suggest me to look at is working fine. It doesn't ask for anything else, as it should.
But i manage to get it working. By manually adding the files it started to compile. But it is weird, NCrunch should not be asking for this extra files.

Thanks for your suggestion
Thanks for confirming you managed to get this working. There must be an implicit dependency on this package somehow, and because of it's ambiguity, NCrunch likely hasn't been able to detect it automatically. If you manage to find out how the package is being referenced, please do let me know.

Post a reply

Log in to reply.