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

KnownFrameworkReferences need to be specific to a target framework version #2527

Closed
dsplaisted opened this issue Sep 12, 2018 · 1 comment · Fixed by #2738
Closed

KnownFrameworkReferences need to be specific to a target framework version #2527

dsplaisted opened this issue Sep 12, 2018 · 1 comment · Fixed by #2738
Assignees
Milestone

Comments

@dsplaisted
Copy link
Member

Right now, we have KnownFrameworkReference items that look something like this in Microsoft.NETCoreSdk.BundledVersions.props:

    <KnownFrameworkReference Include="Microsoft.DesktopUI"
                              RuntimeFrameworkName="Microsoft.DesktopUI.App"
                              DefaultRuntimeFrameworkVersion="3.0.0-alpha-26829-8"
                              LatestRuntimeFrameworkVersion="3.0.0-alpha-26829-8"
                              TargetingPackName="Microsoft.DesktopUI.App"
                              TargetingPackVersion="3.0.0-alpha-26829-8"
                              />

    <KnownFrameworkReference Include="Microsoft.AspNetCore"
                              RuntimeFrameworkName="Microsoft.AspNetCore.App"
                              DefaultRuntimeFrameworkVersion="3.0.0-alpha1-10062"
                              LatestRuntimeFrameworkVersion="3.0.0-alpha1-10062"
                              TargetingPackName="Microsoft.AspNetCore.App"
                              TargetingPackVersion="3.0.0-alpha1-10062"
                              />

These are not specific to the version of .NET Core targeted. So if you were targeting .NET Core 2.x, you could still add a FrameworkReference to Microsoft.DesktopUI, and we would try to add the package reference to the targeting pack.

The KnownFrameworkReference items should include a TargetFrameworkVersion on them to which they apply, and the ResolveFrameworkReferences task should filter them to only look at the ones that apply to the current target framework version. (We might also want a nice error message if you have a FrameworkReference to something that's available in a different version of .NET Core).

@dsplaisted dsplaisted added this to the 3.0.1xx milestone Sep 12, 2018
@dsplaisted dsplaisted self-assigned this Sep 12, 2018
@nkolev92
Copy link
Contributor

nkolev92 commented Nov 8, 2018

I'm curious how the FrameworkReference to TFM mapping will affect NuGet and NuGet/Home#7342.

What would the experience be if someone adds a FrameworkReference to DesktopUI and has net46 as a TFM etc.

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.

2 participants