-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NU1100: Unable to resolve 'XXX' for '.NETFramework,Version=v4.6.2'. #2838
Comments
do you have a zip for me to repro? |
@forki working on it :) |
@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
every time. |
ok how to reproduce? I'm using 15.5 but that should matter that much. I open solution. build, clean, build again and everything still works!? |
@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" <[email protected]>:
… @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>
.
|
@forki with the same error I'm reporting, or something else? |
I can now repro from developer command promt. Any reason why you don't use "dotnet build"? |
ok I found something: your MSBuild command doesn't call paket at all. Trying to find out why.. |
@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 😁 |
lol. now everything works as expected. |
just upgrade to 5.114.4 |
no need to use dotnet build |
thanks @forki appreciate it :) |
crazy bug.... |
@forki there's still a bug lurking here. I still get the build server issue ("NU1100: Unable to resolve 'XXX' for '.NETFramework,Version=v4.6.2'.") when running msbuild (but not dotnet build). |
but that doesn't repro locally? |
so what's the difference on the CI? different msbuild or dotnet version? |
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. |
What I think you should do is to move over to |
Yeah, we have the dotnet SDK installed too, so I am switching to dotnet build 👍 |
nice side effect " VS 2017 Build tools" no longer needed |
I am using VSCode to build a C# Project with Selenium. I following the steps here however when I reach the step to add the Selenium package, I get this error:
which is pretty close to the error reported in this issue. I also posted a question for this issue here. I appreciate your help. |
Description
We are getting
NU1100: Unable to resolve 'XXX' for '.NETFramework,Version=v4.6.2'.
followed by "Restore failed".
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.
Repro steps
Please provide the steps required to reproduce the problem
We are running paket v5.114.0 via magic paket.exe (ie bootstrapper)
We have CS project files in the new project format, targeting .NET 4.6.2
We are running
paket restore --group build
to pull down FAKE and a few others and then
Expected behavior
The project builds successfully, as it does on a machine with VS 2017 installed.
Actual behavior
As a result of paket restore --group build, paket does this:
As a result of MSBuild:
Known workarounds
None
The text was updated successfully, but these errors were encountered: