2

Visual Studio 2015 supports multiple build targets in a vNext project so you can build for vNext CLR, vNext Core and any other .NET build targets.

I understand that vNext project require that dependencies have to be referenced via NuGet packages, but how can I add assembly references to the non-vNext projects that might require GAC or other external dependencies?

My References structure looks like this:

  • .NET Framework 4.5 <--- how do I get an GAC/assembly reference into this?
  • ASP.NET 5.0
  • ASP.NET Core 5.0

Use case: I'm building a library that can work both on standard CLR and the new vNext CLRs, but the standard version requires access to System.Configuration. How do I get the reference of System.Configuration into the classic .NET 4.5 target?

1 Answer 1

2

It seems you can add framework libraries like "System.Runtime.Serialization" to the "frameworkAssemblies". (But I'm not sure this will also work with GAC.)

See example project.json file:

"net45": { "frameworkAssemblies": { "System.Runtime.Serialization": "4.0.0.0" }, "dependencies": { "System.Reflection": "4.0.10-beta-22416", } } 
Sign up to request clarification or add additional context in comments.

1 Comment

Yup that works for GAC refs. Or files you explicitly deploy in the bin folder.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.