Skip to content
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

Support versionless PackageReference for AspNetCore when targeting .NET Core 3.0 #9820

Closed
dsplaisted opened this issue Oct 9, 2018 · 5 comments · Fixed by #2738
Closed
Assignees
Milestone

Comments

@dsplaisted
Copy link
Member

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.

@dsplaisted
Copy link
Member Author

FYI @natemcmaster @DamianEdwards

@natemcmaster
Copy link
Contributor

I think a PackageReference to aspnetcore in 3.0 should be an error. It's not an actual package reference anymore, right?

If that's all we did, the upgrade experience would be a bummer. How hard would it be to have VS switch the item type for us when users upgrade to .NET Core 3.0?

@DamianEdwards
Copy link
Member

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

@dasMulli
Copy link
Contributor

dasMulli commented Oct 31, 2018

to clarify: the scenario is using 3.0 tools to build a 2.1/2.2 app?

@dsplaisted
Copy link
Member Author

@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.

@dsplaisted dsplaisted self-assigned this Dec 4, 2018
@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the 3.0 Preview2 milestone Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants