asp.net - DotNet Core RC2 Project and Net461 dependency resolve issue -
here project.json main dotnet core web project
"frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "dnxcore50", "portable-net45+win8", "net461" ] } }
if add following net461 class library project reference above one. won't build correctly.
"frameworks": { "net461": { } }
and throw error the dependency mscorlib not resolved.
however, if create project using old template(no project.json), , add reference dotnet core project. works fine.
i wonder how fix this?
what you're doing creating library run on .net framework, , trying use application runs on .net core. won't work.
if want run on .net core, project.json of application should contain:
"frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "dnxcore50", "portable-net45+win8" ] } }
and library (the version of netstandard
depend on want do):
"frameworks": { "netstandard1.4": { } }
if want use dotnet cli, still run on .net framework, have following in both library , application (where include framework assemblies inside frameworkassemblies
):
"frameworks": { "net461": { "frameworkassemblies": { } } }