0

我有一个使用 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目录丢失。

提前感谢您的帮助。

4

1 回答 1

0

在 MyGet 上,nuget 包通常会针对 .csproj(而不是直接针对 .nuspec)运行。这会在您的机器上产生相同的结果吗?

构建日志是否还提到了使用 nuget pack 或 msbuild /t:Pack 完成的“打包”操作?

可能是这个问题:https ://github.com/NuGet/Home/issues/2372

于 2017-08-08T18:59:11.847 回答