I have a previously generated DLL with some corporate code that I would like to reuse in my .NETCore project. However, since the source DLL was created and compiled using .NETFramework 4.5, I cannot directly add the dll as a link.
I created a nuget package containing my dll, as shown here . After that I can add such a package to the project. However, I get the following error:
"MyAssembly.dll dependency does not support the .NETCoreApp framework, Version = v1.0"
I have already tried referencing .NETCore.Portable.Compatibility, but I don't think this is the right way. How can I use this dll for my code? This is what my project.json looks like after adding the Nuget package.
{ "version": "1.0.0-*", "dependencies": { "MyAssembly.dll": "1.0.0", "Microsoft.EntityFrameworkCore": "1.0.0", "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0", "Microsoft.NETCore.Portable.Compatibility": "1.0.1", "NETStandard.Library": "1.6.0" }, "frameworks": { "netcoreapp1.0": { "imports": [ "dnxcore50", "portable-net451+win8" ] } } }
Luis becerril
source share