首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MyGet - NuGet包缺少内容目录

MyGet - NuGet包缺少内容目录
EN

Stack Overflow用户
提问于 2017-08-09 00:34:06
回答 1查看 212关注 0票数 0

我有一个使用nuspec文件在MyGet上构建的包(如下所示)。这已经很好地工作了一段时间了,但是几天来,似乎没有创建content目录。

但是,如果我在本地运行nuget pack,它工作得很好,并且包含所有文件。我曾尝试使用contentFiles,但由于项目使用的是旧的packages.config方法,因此无法使用。

代码语言:javascript
复制
<?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目录丢失了。

提前感谢您的帮助。

EN

回答 1

Stack Overflow用户

发布于 2017-08-09 02:59:12

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

另外,构建日志中是否提到了使用nuget pack或msbuild /t:Pack执行的"pack“操作?

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45573634

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档