为什么';t NuGet pack是否将文件添加到工具目录?

为什么';t NuGet pack是否将文件添加到工具目录?,nuget,nuget-package,nuget-spec,Nuget,Nuget Package,Nuget Spec,我有以下nuspec文件: <files> <file src="..\.BuildScripts\Tools\*.ps1" target="tools" /> <file src="..\Build\Results\*.*" target="content" exclude="*.txt" /> </files> 当我运行NuGet-pack project.nuspec时,该过程将在没有任何错误的情况下完成,但是创建的包的

我有以下nuspec文件:

<files>
    <file src="..\.BuildScripts\Tools\*.ps1" target="tools" />
    <file src="..\Build\Results\*.*" target="content" exclude="*.txt" />
</files>

当我运行
NuGet-pack project.nuspec
时,该过程将在没有任何错误的情况下完成,但是创建的包的tools目录是空的。当我将第一行的路径更改为不存在的路径时,确实会出现错误(
找不到文件


NuSpec文件有什么问题

显然,NuGet不喜欢路径中的点。只需将
.BuildScripts
重命名为
BuildScripts
即可解决此问题:

<file src="..\BuildScripts\Tools\*.ps1" target="tools" />


吸取教训,艰苦的道路

有一个
NoDefaultExcludes
命令行选项可以覆盖此行为()