I want to share a project between a WPF (.NET 4.6) application and a .NET Core application. To do this I've made a .NET Standard library by making a portable library initially and converting it in Visual Studio 2015 to .NETStandard version 1.3.
However, the .NETStandard library needs to reference Entity Framework (for example) and so I've added this dependency in the project.json and everything builds happily. However, when I actually run the application, I get a File Not Found exception as soon as I actually try to load data using the Entity Framework library. This is expected, since none of the nuget packages when using .NETStandard are copied to the output directory (unlike using nuget for normal .NET), so I can see the reason for the exception.
How do I fix this/get the nuget dependencies to be copied to output when using a .NETStandard library and referencing from a .NET 4.6 project? (Below is my project.json and happy to add more code if needed).
{
"supports": {},
"dependencies": {
"Microsoft.EntityFrameworkCore.Design": "1.1.0",
"Microsoft.EntityFrameworkCore.Sqlite": "1.1.0",
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.1"
},
"frameworks": {
"netstandard1.3": {}
}
}