【发布时间】:2019-12-23 13:56:25
【问题描述】:
我创建了一个针对 .NET Core 项目的 nuget 包。 这里的想法是添加 xxx.dll 作为引用,将本地复制为 false 并复制输出路径中子文件夹中的所有 DLL 以及子文件夹\resources 中的所有资源文件
针对 NET Core 3 的 nuspec 运行良好。
现在我想针对 NET Framework 4.6.1 做同样的事情。
但内容文件并未添加到项目中。 这是我的 nuspec 文件:
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>xxx.Win.x64.ForIPS11</id>
<version>15.5.3.4</version>
<title>xxx toolkit</title>
<authors>xxx Team</authors>
<owners>xxx</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>xxx 15.5.3.4 x64 Windows to .NETFramework 4.6.1 for IPS 11</description>
<releaseNotes></releaseNotes>
<copyright>2020</copyright>
<tags></tags>
<dependencies>
<group targetFramework=".NETFramework4.6.1" />
</dependencies>
<contentFiles>
<files include="**\subfolder\resources\*.*" buildAction="Content" copyToOutput="true" />
<files include="**\subfolder\*.dll" buildAction="Content" copyToOutput="true" />
</contentFiles>
</metadata>
<files>
<file src="bin\xxx.dll" target="lib\net461" />
<file src="resources\*.*" target="contentFiles\any\any\subfolder\resources" />
<file src="bin\*.dll" target="contentFiles\any\any\subfolder" />
</files>
</package>
我是否对 .NET Framework 目标使用了不兼容的标记? 知道如何完成这项工作吗?
编辑:我在目标项目中使用 VS2017 中的 packages.config 文件
【问题讨论】:
标签: c# nuspec nuget-spec