Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
NU1100: Unable to resolve 'XXX' for '.NETFramework,Version=v4.6.2'. #2838
We are getting
NU1100: Unable to resolve 'XXX' for '.NETFramework,Version=v4.6.2'.
I am not yet sure if this is a NuGet/Build tools issue or a Paket issue. Doesn't happen if you have VS 2017 installed. Only appears to happen when you have "Build Tools for Visual Studio 2017" plus .NET Core 2.0 SDK installed (ie on our build server). We are running v15.4 of the build tools.
If anyone has any suggestions on how to diagnose further, it would be much appreciated.
Please provide the steps required to reproduce the problem
to pull down FAKE and a few others and then
The project builds successfully, as it does on a machine with VS 2017 installed.
As a result of paket restore --group build, paket does this:
As a result of MSBuild:
@forki I have tried replacing with PackageReferences direct in the project files whilst removing the Paket target, and these work fine, so pretty confident this is a Paket issue.
Attached is a sample. Locally, running VS 2017 15.4. Any time after running 'git clean -fdx', and 'build' the solution builds successfully. Run build a second time, and it fails as if it's not restoring the packages.
Run on the build server (running .NET Core 2.0.0 SDK, .NET 4.6.2 SDK and VS Build Tools for 15.4 only), I get
@forki even when running from build.cmd rather than within VS?
My steps to repro the local issue just now were:
With regards the build server issue, the build server has a consistent environment as it's scripted. Can give you the powershell to run to install the dependencies (ie .net core sdk etc) if that's helpful.
That build.cmd does not even work for me on first trial Am 13.10.2017 12:21 schrieb "James Crowley" <firstname.lastname@example.org>:…
@forki <https://github.com/forki> even when running from build.cmd rather than within VS? My steps to repro the local issue just now were: - Extract ZIP to fresh dir - Run build.cmd (pass) - Run build.cmd (fail) With regards the build server issue, the build server has a consistent environment as it's scripted. Can give you the powershell to run to install the binaries as-is if that's helpful. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2838 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AADgNJe7fxmquUNiFu-kbvviOV4LF9yRks5srzm4gaJpZM4P2Oze> .
ok I found something: your MSBuild command doesn't call paket at all.
Trying to find out why..
added a commit
Oct 13, 2017
@forki MsBuild - just a bit of a learning process here to figure out the least painful way to slowly migrate a .NET 4.6.2 150 project solution, running MVC 5 over time without breaking the rest of the engineering team's workflow
I can confirm that I don't get either issue locally or on the build server switching to using 'dotnet build' instead.
Was gonna ask about that weird behaviour for the build group restore, so thanks for fixing it
Yeah, can't repro locally.
On the CI we only have the VS 2017 Build tools as opposed to the full VS installation.
There was previously (unrelated?) NuGet weirdness-es with VS 2017 compared to just having the build tools which I experienced and were fixed in 15.4 (NuGet/Home#4821).
Since then I've been able to build successfully using msbuild on the build server, but only if I switch to using PackageReference instead of paket.