-
Notifications
You must be signed in to change notification settings - Fork 526
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
Broken restictions in paket.lock #3082
Comments
can you please upload a zip with that repro project? |
Here it is w/o paket.lock included: Repro steps
Workaround
|
paket.lock files looks good for me. |
I accidentally zipped paket.lock as well. Please delete it and try again. Here is my output:
|
And here is my output after I remove -restriction: lines from paket.lock
|
I'm a bit lost. I think it's a bug, but I need @matthid to investigate it |
Ok this indeed took a while to understand, but it seems like everything works as designed. Let me explain that a bit... Some facts (at least that's what my testing yields):
Therefore either:
The workaround is to manually add all packages you need for your netstandard application to your dependencies file:
This is working for me with and without global restrictions. So what we can improve is:
|
@matthid, I can confirm that adding Microsoft.AspNetCore.Http in addition to Microsoft.AspNetCore.All metapackage helps. You are right, Microsoft.AspNetCore.All metapackage is netcoreapp2.0 only even lots of packages included are netstandard2.0. This used to work for a long time and suddenly stopped so I thought it is paket issue but it is obviously not. |
Description
I do have both netcoreapp2.0 and netstandard2.0 projects in the solution and this framework restriction in paket.dependencies file
Everything used to work correctly for a long time but recently Paket started adding restrictions to paket.lock where condition can't be satisfied:
This does not work for netstandard2.0 project because of the "(&& (== netstandard2.0) (>= netcoreapp2.0))" restriction.
Repro steps
Expected behavior
Build is successful.
Actual behavior
Build failed with:
error FS0039: The namespace 'AspNetCore' is not defined.
Known workarounds
Remove restrictions (VS Code regex find: "- restriction:.*$" and replace with "") and execute dotnet restore again.
The text was updated successfully, but these errors were encountered: