yizhou;16280 wrote:Thanks Remco.
Our build system relies on setting this MSBuildProjectExtensionsPath property.
I've tried suppressing it for NCrunch before, but I got this error that obj\project.assets.json is not found. The generated files are in .pkgref folder as we set in MSBuildProjectExtensionsPath.
Could we let NCrunch run nuget restore for itself?
I was worried about this. This is, unfortunately, one area of NCrunch where we have little to no flexibility. The problem here is rooted in the way VS handles the Nuget restore step. Basically, we can't do the restore ourselves in a stable way without interfering with VS. When MS introduced the automatic package restore step, our initial builds did actually do this, but we had to take it out because MSBuild simply can't handle two processes performing the step concurrently in the same place.
So we're reliant on VS to perform this restore step for us, then we need to be reliant on standard build conventions when finding these files, because MSBuild has its own expectations and constraints when we call into it.
From the side of someone engineering a build system, overriding this particular property (and certain others like it) can seem like a perfectly reasonable thing to do. But from the perspective of NCrunch's build integration, it's basically like pulling out the foundation under a stack of cards. In almost every other area of the build system there are workarounds we can introduce, or things we can override to bend it to our will. But this part is really baked together. The package restore step and location of its derived files might as well be set in stone as far as a maintainable NCrunch is concerned.
This is not to say that is impossible to make such a system work, but rather that it would involve hacking the build system in ways that would introduce unforeseeable side-effects, making our build integration impossible to maintain.
Sorry, you need to avoid changing this property if you want to use NCrunch on this solution.