我有一个针对多个平台的 .Net Core 库( .Net 3.5 和 Net Standard 1.0 ),因此在构建时,我得到两个每个平台的文件夹一个: net35 和 netstandard1.0 。
每个文件夹都有自己的 MyLibrary.dll , MyLibrary.pdb 和 MyLibrary.xml 文件。
当我运行dotnet pack
时,我想将每个 xml 文件放在 NuGet 包中的正确文件夹下,我无法弄清楚如何要做,所以在下面给出 project.json 的那一刻,我必须明确包含为 net35 生成的 xml 文件 文件 配置。
{
"version": "1.0.0-*",
"authors": [ "John Smith" ],
"title": "Something Awesome",
"name": "Soemthing.Awesome",
"description": "Something that does awesome things.",
"copyright": "2016 John Smith",
"packOptions": {
"copyright": "2016 John Smith",
"owners": [ "John Smith" ],
"licenseUrl": "https://github.com/JohnSmith/LICENSE",
"projectUrl": "https://github.com/JohnSmith/SomethingAwesome",
"requireLicenseAcceptance": false,
"summary": "Brings awesomeness to your project.",
"tags": [ "Awesome" ],
"releaseNotes": ""https://github.com/JohnSmith/SomethingAwesome/1.0",
"files": "bin\\Release\\net35\\Something.Awesome.xml",
"repository": {
"type": "git",
"url": "https://github.com/JohnSmith/SomethingAwesome"
}
},
"frameworks": {
"net35": {},
"netstandard1.0": {
"imports": "dnxcore50",
"dependencies": {
"NETStandard.Library": "1.6.1"
},
"buildOptions": {
"define": [ "NET_STANDARD" ]
}
}
},
"buildOptions": {
"warningsAsErrors": true
},
"configurations": {
"Release": {
"buildOptions": {
"xmlDoc": true,
"optimize": true
}
},
"Debug": {
"buildOptions": {
"xmlDoc": false,
"optimize": false
}
}
}
}