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

Represent FrameworkReferences in NuGet - pack & restore support #7342

Closed
dsplaisted opened this issue Sep 28, 2018 · 2 comments
Closed

Represent FrameworkReferences in NuGet - pack & restore support #7342

dsplaisted opened this issue Sep 28, 2018 · 2 comments

Comments

@dsplaisted
Copy link

dsplaisted commented Sep 28, 2018

Link to specs:

Original issue description
Project files in .NET Core 3.0 will be able to use FrameworkReferences to declare a dependency on optional shared frameworks such as ASP.NET or WPF/WinForms. Currently, a FrameworkReference is expressed like this in a project file:

  <ItemGroup>
    <FrameworkReference Include="Microsoft.DesktopUI"/>
  </ItemGroup>

If a project references a NuGet package or another project that depends on an optional shared framework, then that shared framework dependency should flow from the referenced package or project to the app. This means that FrameworkReferences need to be represented in some way in a NuGet package. We have discussed using the existing frameworkAssembly element for this.

The behavior needed in NuGet would be:

  • During the Pack operation, translate the project's FrameworkReference items into the format that they are expressed in the .nuspec (probably frameworkAssembly)
  • During restore, write FrameworkReference dependencies from referenced packages to the assets file. If frameworkAssembly is used to express these dependencies, then this may happen with little or no code changes
  • During restore, write FrameworkReference information from referenced projects to the assets file. This enables framework references to flow across (possibly transitive) project references
@NTaylorMullen
Copy link

I imagine this would also need to be reflected as part of deps.json as well for transitive packages that have framework references yes?

@nkolev92
Copy link
Member

nkolev92 commented Mar 5, 2019

NuGet side spec at https://github.com/NuGet/Client.Engineering/pull/92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants