I want to share a project between a WPF application (.NET 4.6) and .NET Core. To do this, I created the .NET Standard library by first creating a portable library and converting it from Visual Studio 2015 to .NETStandard version 1.3.
However, the .NETStandard library should reference the Entity Framework (for example), and so I added this dependency to project.json, and everything happens successfully. However, when I actually run the application, I get a File Not Found exception as soon as I actually try to load the data using the Entity Framework library. This is expected since none of the nuget packages when using .NETStandard is copied to the output directory (as opposed to using nuget for regular .NET), so I see the reason for the exception.
How to fix this / get nuget dependencies to copy when using the .NETStandard library and links from a .NET 4.6 project? (Below is my .json project and will happily add more code if necessary).
{
"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": {}
}
}