2017-04-17 35 views
0

我正努力爲.NET MicroFramework項目構建nuget包。NETMF Nuget問題 - 這部分URI已經包含在包中

這是我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不是成爲一個問題。

這裏的任何想法?

回答

0

解決了這個問題。需要確保對目標文件有獨特的文件夾,因此這樣的:

<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" />