-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Localized satellite packages are incorrectly marked as incompatible by the CLI #6328
Comments
/cc @yishaigalatzer @rrelyea @emgarten Can we expose the nuget compatibility check via an API that the CLI can use? |
We don't have actual public APIs on the NuGet packages (as in nothing we can commit to be fully stable), but we can definitely share how to run the check. @joelverhagen can you drop a sample here? |
We have a check but it's out of date. It would be great if we could call into something, even if it wasn't a good API. The cli and nuget ship in the same app so it's impossible to update nuget outside of the cli (as a cli user) so the risk of breaking is low |
@davidfowl agreed. We are taking a look right now |
I don't think we have a We should keep this issue open in dotnet/cli as well as expose a friendly API in NuGet: NuGet/Home#2911. |
@davidfowl now that I think about it, why does the CLI even do this check? If restore succeeds it means the packages are compatible. Can you elaborate a bit? |
Nuget does not persist all of the results of restore. We need the build and the IDE to show nice errors when a restore fails. Today this works in UWP because restore runs on build. In the cli, we try to infer diagnostics from the lock file |
|
Restore succeeds and always writes the lock file (regardless of failure). Build and the project model server want to show the same errors that restore showed. To do that, it tries to repeat the compatibility check to make sure things got resolved.
That's the entire purpose of this request. The errors need to be persisted in some format, preferably the lock file since that's what we use for everything else. |
@yishaigalatzer @rrelyea I see NuGet/Home#2911 is not scheduled yet. Do you expect this to make CLI preview2? |
Note that this completely breaks |
@brthor can you coordinate with @joelverhagen on this one? |
Anything on this? When is preview 3 schedule for? This completely blocks Humanizer from working on xproj. It does appear to install on a csproj that's netstandard. |
This still fails in v1.0.0 final, sadfaes. |
@binoypatel hit the problem: https://github.com/dotnet/corefx/issues/14998#issuecomment-271415006 and dotnet/standard#152 (comment)
@piotrpMSFT what would be your advice? |
Good news :) I just tried this with CLI RC3 bits and successfully added Humanizer to a project. Caveats, of course, but solvable by Humanizer itself! Details:
The above was a successful. I hope @onovotny can take a look and confirm! |
@karelz I would not be doing any new work atop project.json at this time... |
Steps to reproduce
Create a console application and add a reference to
"Humanizer": "2.0.1"
, then rundotnet restore
Expected behavior
Restore completes successfully.
Actual behavior
CLI states that the satellite packages aren't compatible with netcoreapp1.0
This seems to be due to those packages only contained resources, and no runtime, ref or lib assets, and the CLI currently doesn't account for this (see https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.DotNet.ProjectModel/Resolution/PackageDependencyProvider.cs#L35-L38)
Environment data
dotnet --info
output:The text was updated successfully, but these errors were encountered: