-
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
[dotnet-cache] cache command should respect PackageTargetFallback element #1022
Comments
i am looking into this, there are some crossgen issues will reply when i learn more |
The crossgen issue i am hitting is as follows:
@weshaggard System.Net.Http.Primitives.dll listed above is PCL correct ? How are we expecting the PCL libs to get their runtime closure ? like the one from above: cc @gkhanna79 |
2 questions/comments.
|
@weshaggard It was brought in as part of transitive closure of Microsoft.AspNetCore.Mvc.WebApiCompatShim/1.2.0-preview1-24137
|
@weshaggard From what @ramarag and @eerhardt described in an offline discussion, this is happening when compiling PCLs that are packaged in a nuget package but do not carry their dependencies, either within the same package or in a dependent package. What is our story for consuming PCL/Desktop artifacts for 2.0? |
@JunTaoLuo Is this PCL expected to be part of the Antares/ASP.NET cache? If so, was this compiled before this cache feature? |
I don't know how this ever worked on .NET Core, as we didn't ever have a System.Net shim that would resolve that dependency. Also in general we discourage usage of Microsoft.Net.Http package for core and instead folks should use System.Net.Http. That aside we do plan on having a number of these shims in .NET Core 2.0, in fact they were added with dotnet/corefx#17620, but I wouldn't rely on that we should definitely question whether or not Microsoft.Net.Http should be in the Asp.Net package cache when we don't want folks using it. |
Thanks @weshaggard.
@JunTaoLuo An app using such artifacts will only work as long as they use API in such components that do not rely on the missing dependencies. Thus, during JIT time, such an app may work. However, for crossgen, we need to have complete dependencies in place before crossgen can be attempted as it is a precompilation of the entire assembly and not specific methods. |
We have included M.A.Mvc.WebApiCompatShim when we built our package cache previously I'll look into how it was built and share what I find. |
We used to build this package in our package cache. We cross-gen our dll but not the PCL dependency. We had a list of explicit exclusions for the dlls of the PCL dependencies. I'm wondering if there should be a feature for this or maybe even default to skip cross-gen for PCL dependencies. Note that I'm no longer blocked on this issue since we decided to not ship this package anymore. |
…0191019.1 (dotnet#1022) - Microsoft.AspNetCore.Analyzers - 5.0.0-alpha1.19519.1 - Microsoft.AspNetCore.Mvc.Api.Analyzers - 5.0.0-alpha1.19519.1 - Microsoft.AspNetCore.Mvc.Analyzers - 5.0.0-alpha1.19519.1 - Microsoft.AspNetCore.Components.Analyzers - 5.0.0-alpha1.19519.1
Repro: https://github.com/JunTaoLuo/DotnetCache/tree/c4d1413da5a8cc512184f701f2b9284485d2e203/Fallback
Without respecting this element, during dotnet cache, the following error will be seen at restore:
cc @eerhardt
The text was updated successfully, but these errors were encountered: