簡體   English   中英

創建包時找不到文件

[英]File not found when creating a package

這是第一次嘗試創建Nuget包。

我嘗試運行以下命令:

nuget.exe pack Package.nuspec

但我得到以下例外:

NuGet.exe:找不到文件:'Site1.Master'。 在行:1 char:10 + nuget.exe <<<< pack Package.nuspec + CategoryInfo:NotSpecified :(找不到文件:'Site1.Master'。:String)[],RemoteException + FullyQualifiedErrorId:NativeCommandError


Package.nuspec的files部分如下所示:

<files>
    <file src="Site1.Master" target="content\Site1.Master" />
    <file src="Site1.Master.cs" target="content\Site1.Master.cs" />
    <file src="Site1.Master.cs.designer" target="content\Site1.Master.cs.designer" />
</files>

我的樣本解決方案是這樣的:

在此輸入圖像描述


目錄:

在此輸入圖像描述

.nu​​spec文件中的路徑始終相對於.nuspec文件本身的位置。 文件名錯誤或目錄路徑錯誤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM