我有一个使用nuspec文件在MyGet上构建的包(如下所示)。这已经很好地工作了一段时间了,但是几天来,似乎没有创建content目录。
但是,如果我在本地运行nuget pack,它工作得很好,并且包含所有文件。我曾尝试使用contentFiles,但由于项目使用的是旧的packages.config方法,因此无法使用。
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>MyProject</id>
<version>1.4.0.2</version>
<title>Project Description</title>
<authors>0Neji</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Description</description>
<summary>Summary</summary>
<releaseNotes>Release notes</releaseNotes>
<language>en-GB</language>
<dependencies>
<group targetFramework=".NETFramework4.6.1">
<dependency id="UmbracoCms" version="7.6.4" />
<dependency id="usync.snapshots" version="1.0.2.740" />
<dependency id="SharpRaven" version="2.1.0" />
<dependency id="Autofac.Mvc5" version="4.0.2" />
<dependency id="Autofac.WebApi2" version="4.1.0" />
</group>
</dependencies>
</metadata>
<files>
<file src="robots.txt" target="content\robots.txt" />
</files>
</package>MyGet成功地运行并构建了包,但是当我下载项目时,content目录丢失了。
提前感谢您的帮助。
发布于 2017-08-09 02:59:12
在MyGet上,nuget pack通常会针对.csproj (而不是直接针对.nuspec )运行。这会在你的机器上产生相同的结果吗?
另外,构建日志中是否提到了使用nuget pack或msbuild /t:Pack执行的"pack“操作?
https://stackoverflow.com/questions/45573634
复制相似问题