Referencing a nuget package create by an asp.net 5 class library from a Win Forms app targeting .Net 4.0 Client Profile -
i have asp.net 5 class library containing object model need share winforms application targeting .net framework 4.0 client profile.
i have created nuget package asp.net 5 class library , tried referencing nuget package winforms application. when adding referece following error:
could not install package 'package name 1.0.0'. trying install package project targets '.netframework,version=v4.0', package not contain assembly references or content files compatible framework. more information, contact package author.
i tried adding dnx40 target framework in "frameworks" section of project.json file shown below.
{ "authors": [ "author" ], "dependencies": { }, "description": "shared object models", "frameworks": { "dnx40": { }, "dnx451": { }, "dnxcore50": { "dependencies": { "system.collections": "4.0.10-beta-22816", "system.linq": "4.0.0-beta-22816", "system.threading": "4.0.10-beta-22816", "microsoft.csharp": "4.0.0-beta-22816" } } }, "licenseurl": "", "projecturl": "", "tags": [ "" ], "version": "1.0.0-*" }
i suspect i'm targeting wrong framework version.
but how specify .net framework 4.0 client profile target framework? possible?
use net40
:
"frameworks": { "net40": {}, "dnx451": { }, "dnxcore50": {} }
here possible combinations: https://github.com/aspnet/dnx/blob/b0c5920b8ff0a96cac2446b1aeb8a80b3069c2ab/test/microsoft.framework.runtime.tests/versionutilityfacts.cs
Comments
Post a Comment