당신은 net45 대상에 대한 csproj를 계속 사용하고 "net45"와 "netstandard1.x"프레임 워크 (샘플로 사용 project.json of my library) 모두를 대상으로 project.json을 추가 할 수 있습니다 : 당신이 정의 할 수 있습니다
"frameworks": {
"net45": {
"frameworkAssemblies": {
"System.Data": "",
"System.ComponentModel.DataAnnotations" : ""
},
"buildOptions": {
"define": []
}
},
"netstandard1.5": {
"dependencies": {
"NETStandard.Library": "1.6.0",
"System.Data.Common": "4.1.0",
"System.Reflection": "4.1.0",
"System.Reflection.Primitives": "4.0.1",
"System.Threading": "4.0.11",
"System.Threading.Tasks": "4.0.11",
"System.ComponentModel.Annotations": "4.1.0"
},
"buildOptions": {
"define": [ "NET_STANDARD" ]
}
}
주 net45 또는 netcore 특정 코드 단편에 대한 조건부 컴파일 상수. 당신이 project.json이있을 때, 당신은 net45 및 netstandard 모두 포함 다음 명령을 사용하여 빌드 nuget 패키지를 준비 할 수
:
> dotnet pack --configuration Release
"DOTNET 팩"의 정보를 사용하지 않는 것을 잊지 마세요 nuspec 파일 및 모든 메타 데이터가 project.json에 있어야합니다.
사용자의 도움이 절실한 경우가 아니라면 기다려주십시오. 이것이 오픈 소스 프로젝트에서 내가 한 일입니다. 현재의 금형 제작은 너무 많은 고통이며 아마도 시간을 낭비하고 싶지 않을 것입니다. 최근에 Microsoft에서 몇 가지 약속을했습니다. https://blogs.msdn.microsoft.com/dotnet/2016/09/26/introducing-net-standard/ –
@LexLi 감사합니다. 현재 사용할 수있는 도구는 무엇입니까? – developer82
http://dot.net에 필요한 모든 것이 있습니다. –