【问题标题】:Issue with NETMF Nuget - This partUri is already contained in the packageNETMF Nuget 的问题 - 此 partUri 已包含在包中
【发布时间】:2017-04-17 04:46:15
【问题描述】:

我正在努力为 .NET MicroFramework 项目构建一个 nuget 包。

这是我的 nuspec 文件:

<?xml version="1.0"?>
<package >
  <metadata>
    <id>WildernessLabs.Netduino.Foundation</id>
    <title>Netduino.Foundation</title>
    <version>1.0.0.0</version>
    <authors>Bryan Costanich, Frank Krueger, Craig Dunn</authors>
    <owners>Wilderness Labs</owners>
    <licenseUrl>https://github.com/WildernessLabs/Netduino.Foundation/blob/master/LICENSE</licenseUrl>
    <projectUrl>https://github.com/WildernessLabs/Netduino.Foundation</projectUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Netduino.Foundation greatly simplifies the task of building complex .NET Microframework (MF) powered connected things with Netduino.</description>
    <copyright>Copyright 2017 Wilderness Labs</copyright>
    <tags>NETMF Netduino</tags>
  </metadata>
  <files>
    <file src="bin/Release/Netduino.Foundation.*" target="lib/netmf" />
    <file src="bin/Release/le/Netduino.Foundation.*" target="lib/netmf" />
    <file src="bin/Release/be/Netduino.Foundation.*" target="lib/netmf" />
  </files>
</package>

它与我的.csproj 文件位于同一文件夹中。当我运行nuget pack Netduino.Foundation.nuspec -verbosity detailed 时,出现以下错误:

System.InvalidOperationException: This partUri is already contained in the package

我在这里唯一能想到的是bin/be/le 文件夹包含Netduino.Foundation.dll,但在检查other NETMF .nuspec files 时,这似乎不是问题。

这里有什么想法吗?

【问题讨论】:

    标签: nuget .net-micro-framework


    【解决方案1】:

    解决了这个问题。需要确保文件的目标具有唯一的文件夹,所以这样:

    <file src="bin/Release/Netduino.Foundation.*" target="lib/netmf" />
    <file src="bin/Release/le/Netduino.Foundation.*" target="lib/netmf" />
    <file src="bin/Release/be/Netduino.Foundation.*" target="lib/netmf" />
    

    变成:

    <file src="bin/Release/Netduino.Foundation.*" target="lib/netmf43/" />
    <file src="bin/Release/le/Netduino.Foundation.*" target="lib/netmf43/le" />
    <file src="bin/Release/be/Netduino.Foundation.*" target="lib/netmf43/be" />
    

    【讨论】:

      猜你喜欢
      • 2021-01-12
      • 2018-04-02
      • 2013-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-11
      • 2014-01-15
      相关资源
      最近更新 更多