aspnet / MetaPackages

[Archived] NuGet meta packages. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
211 stars 109 forks source link

Microsoft.AspNetCore.All cannot be used from net47 #222

Closed mjrousos closed 7 years ago

mjrousos commented 7 years ago

Since ASP.NET Core packages generally target .NET Standard 2.0, the product can work on NetCore, NetFx, or Mono.

However, the Microsoft.AspNetCore.All package is still targeting netcoreapp2.0, so it can't be used when the project's target framework is net47. I've confirmed that replacing Microsoft.AspNetCore.All with the individual ASP.NET Core packages works when targeting Net47, but it would be very convenient to be able to use the metapackage in that scenario.

JunTaoLuo commented 7 years ago

Please refer to https://github.com/aspnet/MetaPackages/issues/198.

mjrousos commented 7 years ago

Ah, I see. Out of curiosity, what netcoreapp2.0-specific features does Microsoft.AspNetCore.All depend on?

Tratcher commented 7 years ago

It depends on the presence of C:\Program Files\dotnet\store\x64\netcoreapp2.0 on the dev and production machines so it can avoid publishing all of those dlls.

mjrousos commented 7 years ago

I see; that makes sense. Does that mean we shouldn't use the meta-package if deploying self-contained?

Tratcher commented 7 years ago

There's a publish opt-out flag for self-contained scenarios. @JunTaoLuo can provide the details.

mjrousos commented 7 years ago

Cool, thanks for the information!

JunTaoLuo commented 7 years ago

By default, self-contained apps do not trim publish output so you don't have to explicitly disable it in that scenario. To disable publish output trimming for platform dependent apps, you can set the PublishWithAspNetCoreTargetManifest property to false in your project file.

JunTaoLuo commented 7 years ago

I'm closing this issue as the question has been answered and there are no action items.