I have converted all my projects to use PackageReference
and now NCrunch is failing to build. VS builds and restores packages just fine.
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
NCrunch: This project was built on server '(local)'
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets: The package AutoMapper with version 6.2.2 could not be found in C:\Users\DanielSimonavi??ius\.nuget\packages\. Run a NuGet package restore to download the package.
but the packages do exist?!
C:\Users\DanielSimonavičius\.nuget\packages\automapper>dir /s *.*
Directory of C:\Users\DanielSimonavičius\.nuget\packages\automapper
One thing - the project files are on P: drive, if I try to add "additional files to include", it would not let me: "... Expressions must be relative path of existing file or directory"...
It doesn't make sense to me that MSBuild would be giving you this error under NCrunch.
I think we should try comparing the NCrunch workspace to your foreground solution, and trying to find the point of difference that is causing this.
Try the following:
1. Right click on the failing build in your NCrunch Tests Window.
2. Go to advanced->Browse to workspace
3. Find the generated .csproj file inside the workspace
4. Open a command prompt, try running MSBuild.exe against the .csproj file to see what you get. You can find MSBuild.exe under your VS installation (i.e. C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin)
When dealing with a package reference, the reference from the generated csproj should behave the same way as it does inside your foreground solution. You can freely change the files in the workspace to see if you can find the point of difference causing the failure. The files underneath the 'obj' directory are also very important when experimenting with this - it's possible that there is something wrong with the project.assets.json file.
could it be that my when ncrunch is unable to parse unicode character in path (note the -> ??)
ncrunch path
The package AutoMapper with version 6.2.2 could not be found in C:\Users\DanielSimonavi??ius\.nuget\packages\. Run a NuGet package restore to download the package.
vs real:
C:\Users\DanielSimonavičius\.nuget\packages\automapper
manual msbuild output (important bits) below:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin>msbuild "C:\Users\DanielSimonavičius\AppData\Local\NCrunch\980\2\WeighLogic.Common\WeighLogic.Common.csproj"
Microsoft (R) Build Engine version 15.5.180.51428 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
btw I'm in a contract with a company here now that may want to get 15x ncrunch licenses since they saw me using it.
They were planning to send a quote request couple months ago.
You're welcome btw :)
danius wrote:Manual msbuild worked just fine, see below.
could it be that my when ncrunch is unable to parse unicode character in path (note the -> ??)
That is suspect ... I'm going to need to fish up some more info to be sure ..
Would you be able to do the following?
- Submit a bug report after this happens, I can check the log for weird stuff
- Copy/paste the contents of your project.assets.json file as it exists inside the NCrunch workspace here into the forum (or submit via contact form).
- See if you can build a minimal sample project on your machine that can reproduce the issue, perhaps just by trying to reference the same package in a new empty project. This will help to determine if it's project specific or related to your environment
danius wrote:
btw I'm in a contract with a company here now that may want to get 15x ncrunch licenses since they saw me using it.
They were planning to send a quote request couple months ago.
You're welcome btw :)
I have setup quick console app, and can confirm it's still happening on local machine. Yet the grid node compiles and executes the test.
I suspect the path is the culprit.
This project was successfully built on computers: office.danius****.com
This project failed to build on computers: (local)
Probably not much point giving you sample project. it will simply work under your nuget config. nuget config -set globalPackagesFolder =P:\Projects\packages solved it for me