Another advantage is that vNext projects output nuget-packages during assembly, while pre-vNext class libraries only output DLLs. If you specify multiple target frameworks in the project.json file, the nuget-package from the building will contain the DLL created for all of these target frameworks.
An example is the .json project:
{ "dependencies": { "Microsoft.Framework.DependencyInjection": "1.0.0-*", "System.Linq": "4.0.0.0", }, "frameworks": { "net45": {}, "aspnetcore50": {} } }
If you run the kpm build command from the class library project folder, it will output a nuget package containing the following files.
lib/aspnetcore50/ProjectName.dll lib/aspnetcore50/ProjectName.xml lib/net45/ProjectName.dll lib/net45/ProjectName.xml
When you reference this class library from other projects, it will use the correct DLL depending on the target structure that it requires.
source share