Visual Studio 2017中的Nuget安装会跳过名为“Windows”的内容文件夹 [英] Nuget install within Visual Studio 2017 skips content folder named “Windows”
问题描述
我创建了一个包含名为"Windows"的内容文件夹的nuget包。文件夹结构如下:
I created a nuget package containing a content folder named "Windows". The folder structure is as follows:
|- package.nuspec
|- content
|- first.cs.pp
|- Windows
|- second.cs.pp
包是使用Nuget.exe版本4.7.0.5148从命令行成功创建:
The package is created successfully from the command line using Nuget.exe version 4.7.0.5148:
> nuget.exe pack package.nuspec
> nuget.exe pack package.nuspec
我确认所有文件都正确包含在.nupkg文件中。但是,当我在Visual Studio项目中安装此程序包时,将排除整个Windows文件夹。如果我将's'更改为'z'(Windowz),重新打包并重新安装,它可以正常工作
并安装了second.cs。 无论我使用Nuget Package Manager UI还是包管理器控制台,都会失败。 我使用-verbose标志从控制台运行,甚至没有提到Windows文件夹。
I verified that all files were correctly included in the .nupkg file. However, when I install this package in a Visual Studio project, the entire Windows folder is excluded. If I change the 's' to a 'z' (Windowz), repack and reinstall, it works just fine
and second.cs is installed. It fails whether I use the Nuget Package Manager UI or the package manager console. I ran from the console using the -verbose flag, and the Windows folder isn't even mentioned.
是"Windows"还是nuget的保留文件夹名称? 关于为什么会被跳过的想法?
Is "Windows" a reserved folder name for nuget? Thoughts as to why it would be skipped?
包的内容和包本身发布到 github.com/wimpleshapers/SOPackageWindows。
The contents of the package and the package itself are published to github.com/wimpleshapers/SOPackageWindows.
推荐答案
嗨wimpleshapers,
我发现你发布了相同的
主题,是吗?
I find you have posted a same thread in SO forum, did you?
我试图重新编写你的问题,下载这个软件包并用Nuget Package explorer打开它,似乎它是一个目标框架,我检查
文档,显示了Windows作为支持框架的设计。
I tried to repro your issue, download this package and open it with Nuget Package explorer, seems it is a target framework there and I check the Docs, shows Windows as a support framework be designed.
正如你所说,当文件夹名为"windows"时,它会被识别为"框架",但修改为任何单词如"windowz",只是一个简单的文件夹命名。
希望我的回答很有帮助,祝愿美好的一天
J
Hope my answer would be helpful and wish a wonderful day J
Br
可能
这篇关于Visual Studio 2017中的Nuget安装会跳过名为“Windows”的内容文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!