-
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
Shared framework publish on wildcard Microsoft.NETCore.App results in the "Error loading hostpolicy" exception #5706
Comments
There are two issues here:
|
@schellap 🎉 😄 Working! 🎉 😄 for me now on -2394. I'm using the wildcard syntax for
Shall I close this now? You don't need this to remain open, correct? |
Wildcard is an issue if whats on the feed is higher than whats on the box as we don't downgrade. Version ranges @davidfowl :) |
The feed got updated with the netcoreapp bits lower than or equal to whats on the box. |
I'll close then. Thank you @schellap for your help. I'm still a little 💀 scared 💀 of the shared framework model due to the instability of my shared test app over the last week. Standalone has been rock-solid for test apps and production apps. Time and experience with shared should change that feeling. Thanks again for your help. |
@schellap 's comment "The second issue is the project.json targets 1.0.0-* picks up some framework potentially a higher version from the feed than even what CLI MSIs bring in. Thus this higher framework is not found on the box. Our roll-forward doesn't downgrade so the app has the FX missing." should be addressed. The star is too tempting, and does result in real head-scratchers. |
@bleroy @blackdwarf what is the fix you imagine here? |
@piotrpMSFT so there are a couple of things that come to mind (not exclusive):
The templates already do not contain a star, so in order to come into this situation, the user has to manually modify the dependency in the project file. |
This needs to work with This scenario will only blow up in two cases, and I don't think I want to block other scenarios since doing a build shouldn't require that you install a shared framework e.g. The first case it blows up is The second case is
So, if we fix up the |
@piotrpMSFT sounds like a plan. Of course, we need docs as well. I will file that issue in dotnet/docs repo. |
Documentation bug is filed, and the |
Steps to reproduce
Create a shared framework application that targets a wildcard
Microsoft.NETCore.App
package with ...with
NuGet.config
of ...Expected behavior
Restore, publish, and
dotnet .\testshared.dll
runs the app.Actual behavior
project.lock.json
resolves the package toMicrosoft.NETCore.App/1.0.0-rc2-23931
testshared.runtimeconfig.json
resolves to ...dotnet .\testshared.dll
results in ...Environment data
.NET Command Line Tools (1.0.0-rc2-002363)
Product Information:
Discussion with @schellap on this at: https://github.com/dotnet/cli/issues/2452
Possibly related or a dupe of: https://github.com/dotnet/cli/issues/2405
Repro project: https://github.com/GuardRex/sharedapp
The text was updated successfully, but these errors were encountered: