Skip to content

Instantly share code, notes, and snippets.

@dhei
Created September 13, 2016 23:44
Show Gist options
  • Save dhei/d1ac6269a9a3c9aedece6c840ba611d0 to your computer and use it in GitHub Desktop.
Save dhei/d1ac6269a9a3c9aedece6c840ba611d0 to your computer and use it in GitHub Desktop.
Nuget Framework Assembly Reference

Specifying Framework Assembly References (GAC)

In some cases, a package may depend on an assembly that’s in the .NET Framework. Strictly speaking, it’s not always necessary that the consumer of your package reference the framework assembly. But in some cases, it is important, such as when the developer needs to code against types in that assembly in order to use your package. The element, a child element of the metadata element, allows you to specify a set of frameworkAssembly elements pointing to a Framework assembly in the GAC. Note the emphasis on Framework assembly. These assemblies are not included in your package as they are assumed to be on every machine as part of the .NET Framework.

<frameworkAssemblies>
  <frameworkAssembly assemblyName="System.ServiceModel" targetFramework="net40" />
  <frameworkAssembly assemblyName="System.SomethingElse"  />
</frameworkAssemblies>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment