Reference a .NET 3.5 DLL from ASP.NET Core project -


i have dll compiled under .net 3.5 represents poco data model. client application limited .net 3.5 , dll must shared both client , server, recompiling dll isn't option.

i attempting rewrite server rest api asp.net core mvc project (using 1.0 release , preview 2 tools under vs2015). tried updating project.json so-called "bin syntax" shown below, package restore log shows bunch of errors such as:

error: package microsoft.netcore.app 1.0.0 not compatible net35 (.netframework,version=v3.5). package microsoft.netcore.app 1.0.0 supports: netcoreapp1.0 (.netcoreapp,version=v1.0)

"frameworks": { "netcoreapp1.0": {     "imports": [ "dotnet5.6", "portable-net45+win8" ] }, "net35": {     "bin": { "assembly": "c:\\source\\externaldllsdebug\\datadef.dll" } } 

i tried setting nuget package in dll folder making folder new nuget source. opened package fine failed when attempted import dlls.

i don't think trying possible currently.

an alternate solution refactor project produces shared dll produce library compatible both .net 3.5 , netcoreapp1.0:

"frameworks": {     "net35": { },     "netstandard1.1": {         "dependencies": {             "netstandard.library": "1.6.0"         }     } } 

this way, produce dll still worked in .net 3.5 project, , 1 installed in asp.net core project without issues or hacks.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -