-
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
Support ASP.NET Core PackageReference when targeting .NET Core 3.0 or higher #2738
Support ASP.NET Core PackageReference when targeting .NET Core 3.0 or higher #2738
Conversation
… Core 3.0 Replace it with a FrameworkReference and warn. Also generate an error if Microsoft.AspNetCore.All is used. Fixes dotnet#10124
e6ffce2
to
c6be6bc
Compare
@DamianEdwards @natemcmaster Would you (or others) like to review the experience and message text here? Damian had commented:
This PR adds the following warning if you have a PackageReference to Microsoft.AspNetCore.App (with any Version, or no Version):
If you have a PackageReference to Microsoft.AspNetCore.All, you will get the following error:
How does this look? |
Looks good. |
<Target Name="FixAspNetReference" AfterTargets="ResolveFrameworkReferences"> | ||
<ItemGroup> | ||
<PackageReference> | ||
<Publish Condition="'%(Identity)' == 'Microsoft.AspNetCore.App'">true</Publish> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it come out out ResolveFrameworkReferences this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out it does, so this was unnecessary. I think this was a leftover change from previous work I was doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for fixing :)
….12 (#2738) - Microsoft.DotNet.Cli.Runtime - 5.0.100-alpha1.19458.12
What if you wanted to use this with your own framework and wanted to use the KnownFrameworkReference to add a framework to the known ones and do not explicitly set the things added in this PR? |
Fixes dotnet/cli#10124
Also fixes #2527