Portable library in .net core -
i new .net core , having doubt portable libraries.
i have created .net core web application, , framework section of project.json looks follows:
"frameworks": { "netcoreapp1.0": { "imports": [ "portable-net4+netcore45" ], "dependencies": { "microsoft.netcore.app": { "version": "1.0.0-*", "type": "platform" } } } }
now in above case, meaning of "portable-net4+netcore45"?
does mean, can run .net core application on machine .net framework 4 installed?
will work without .net core installation?
no, above still require .net core installed, because using "type": "platform"
, requires platform installed , package serves reference.
if want run w/o .net core framework/sdk being installed, have change to
"dependencies": { "microsoft.netcore.app": "1.0.0" }, "frameworks": { "netcoreapp1.0": {} }, "runtimes": { "win10-x64": {}, "osx.10.11-x64": {} }
please note "runtimes" section added, required if want run w/o installing .net core runtime , need add target os list, linux etc.
the "imports": ["portable-net4+netcore45"]
section tells nuget should install portable libraries match 2 targets, if not support netcoreapp1.0
/netstandard1.6
yet.
most libraries target win8/8.1/uwp should work, there no guarantee. import tells nuget "install anyways".
check out msdn docs on how target different .net core app types.
Comments
Post a Comment