Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 在不同的文件夹中使用相同的文件打包nupsec文件时,NuGet不会引发错误_Visual Studio_Nuget_Nuget Spec - Fatal编程技术网

Visual studio 在不同的文件夹中使用相同的文件打包nupsec文件时,NuGet不会引发错误

Visual studio 在不同的文件夹中使用相同的文件打包nupsec文件时,NuGet不会引发错误,visual-studio,nuget,nuget-spec,Visual Studio,Nuget,Nuget Spec,当我打包一个.nuspec文件以生成一个包时,其中包含不同文件夹中的一些文件,但两个文件夹中都存在一个文件,然后我打包这个.nuspec文件。NuGet打包成功,但只包含一个,不抛出错误 My.nupsec文件类似于: <files> <file src="foo\test.dll" target="Tools" /> <file src="bar\test.dll" target="Tools" /> </files>

当我打包一个.nuspec文件以生成一个包时,其中包含不同文件夹中的一些文件,但两个文件夹中都存在一个文件,然后我打包这个.nuspec文件。NuGet打包成功,但只包含一个,不抛出错误

My.nupsec文件类似于:

  <files>
    <file src="foo\test.dll" target="Tools" />
    <file src="bar\test.dll" target="Tools" />
  </files>

我知道我可能会覆盖tools文件夹中的dll文件,但是NuGet应该抛出有关此覆盖的错误或警告

有什么建议吗

在不同的文件夹中使用相同的文件打包nupsec文件时,NuGet不会引发错误

这是一个关于NuGet的已知问题。NuGet团队正在修复它以支持将来的版本

您可以在GitHub上添加对此问题的评论或投票:。当有足够多的社区对此反馈进行投票并添加评论时,产品团队成员将认真对待此反馈

目前,解决此问题的方法是对不同文件夹的同一文件或目标使用不同的名称,如:

  <files>
    <file src="foo\test.dll" target="Tools\foo" />
    <file src="bar\test.dll" target="Tools\bar" />
  </files>

希望这有帮助