question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support versionless PackageReference for AspNetCore when targeting .NET Core 3.0

See original GitHub issue

In .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:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
DamianEdwardscommented, Oct 31, 2018

Can’t we support it but make it a warning?

0reactions
dsplaistedcommented, Nov 8, 2018

@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 the TargetFramework to netcoreapp3.0. Per @DamianEdwards’ suggestion, current POR is to build correctly but generate a warning.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found