Support versionless PackageReference for AspNetCore when targeting .NET Core 3.0
See original GitHub issueIn .NET Core 3.0, the syntax for depending on the ASP.NET Core shared framework is:
<FrameworkReference Include="Microsoft.AspNetCore" />
In .NET Core 2.1 and 2.2, a versionless PackageReference
is used instead:
<PackageReference Include="Microsoft.AspNetCore.App" />
In order to support retargeting 2.x apps to 3.0, we should also support the PackageReference
syntax when targeting 3.0. We might also want a warning or info message suggesting a change to the newer syntax.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
PackageReference to Microsoft.AspNetCore.App is not ...
This error typically occurs after you've upgraded a project to .NET Core 3.0 or later, from an earlier version that required PackageReference ......
Read more >Replace PackageReference to Microsoft.AspNetCore.App ...
Replace PackageReference to Microsoft.AspNetCore.App with FrameworkReference #3612 ; area-infrastructure Includes: MSBuild projects/targets, ...
Read more >A PackageReference to Microsoft.AspNetCore.App is not ...
AspNetCore.App is not necessary when targeting .NET Core 3.0 or higher. If Microsoft.NET.Sdk.Web is used, the shared framework will be ...
Read more >NETSDK1079: The Microsoft.AspNetCore.All package is ...
All package is not supported when targeting .NET Core 3.0 or higher. ... All but are not included in the ASP.NET Core shared...
Read more >Deep-dive into .NET Core primitives, part 2: the shared ...
ASP.NET Core shipped as a shared framework for the first time in 2.1. ... rely on the presence of shared components on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can’t we support it but make it a warning?
@dasMulli That’s not the scenario for this bug. The scenario for this bug is that you have a 2.1/2.2 app with a versionless AspNetCore
PackageReference
, and then you change theTargetFramework
tonetcoreapp3.0
. Per @DamianEdwards’ suggestion, current POR is to build correctly but generate a warning.