简体   繁体   English

MyGet-NuGet软件包缺少内容目录

[英]MyGet - NuGet Package Missing Content Directory

I have a package that gets built on MyGet using a nuspec file (similar to the below). 我有一个使用nuspec文件(类似于以下内容)在MyGet上构建的软件包。 This has been working fine for a while but over the couple of days it seems that the content directory doesn't get created. 这已经工作了好一阵子,但是几天来似乎没有创建content目录。

However, if I run nuget pack locally, it works fine and includes all of the files. 但是,如果我在本地运行nuget pack ,它可以正常工作并包含所有文件。 I've attempted to make use of contentFiles but this doesn't work as the project is using the old packages.config method. 我尝试使用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 runs and builds the package successfully but when I download the project, the content directory is missing. MyGet成功运行并生成软件包,但是当我下载项目时, content目录丢失了。

Thanks in advance for any help. 在此先感谢您的帮助。

On MyGet the nuget pack wil typically run against the .csproj (and not the .nuspec directly). 在MyGet上,nuget包通常会针对.csproj(而不是直接针对.nuspec)运行。 Does that produce the same result on your machine? 在您的计算机上产生相同的结果吗?

Also does the build log mention the "pack" action being done using nuget pack or msbuild /t:Pack? 生成日志中是否还会提到使用nuget pack或msbuild / t:Pack完成的“ pack”操作?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM