[英]Nuget 3.2.0 don't add additional files/folder in project
Since a recent update of Nuget Package Manager (from 2.9 to 3.2.0 I guess), installing package via nuget doesn't add addition files of the package anymore. 自从Nuget Package Manager最近更新(我想从2.9到3.2.0)以来,通过nuget安装软件包不再添加软件包的附加文件了。 It just adds the libraries only, update the "project.json" and something like that.
它只是添加了库,更新了“project.json”之类的东西。
For example: Installing MVVMLight to a project will add Models, ViewModels and Views folder to project. 例如:将MVVMLight安装到项目中会将Models,ViewModels和Views文件夹添加到项目中。 Also, it will add a MainViewModel.cs, ViewModelLocator.cs to ViewModels folder.
此外,它还会将一个MainViewModel.cs,ViewModelLocator.cs添加到ViewModels文件夹中。 Now none of these files/folders are added to project.
现在这些文件/文件夹都没有添加到项目中。
Any suggestion will help 任何建议都会有所帮助
Since Nuget 3.1 this is no longer supported: https://docs.nuget.org/release-notes/nuget-3.1 . 自Nuget 3.1以来,不再支持此版本: https ://docs.nuget.org/release-notes/nuget-3.1。 One of the main reasons is that packages can copy in files on install, but you're not sure what to do with it on uninstall (as content might have changed manually).
其中一个主要原因是软件包可以在安装时复制文件,但是您不确定在卸载时如何处理它(因为内容可能已手动更改)。 But do note that there's an open issue to maybe re-enable this functionality.
但请注意,可能会重新启用此功能存在未解决的问题 。
Laurent Bugnion of MVVM Light is aware of this issue as well: MVVM Light的Laurent Bugnion也意识到了这个问题:
Caution: Full package in Windows 10 Universal applications (UWP)
警告:Windows 10通用应用程序(UWP)中的完整包
There is a known issue when you install the “mvvmlight” package in Windows 10 universal applications.
在Windows 10通用应用程序中安装“mvvmlight”软件包时存在一个已知问题。 The Nuget team unfortunately changed the way that Nuget works for this framework, and it doesn't allow installing additional files, or running scripts anymore.
不幸的是,Nuget团队改变了Nuget为这个框架工作的方式,它不再允许安装其他文件或运行脚本。 Because of this, installing the “mvvmlight” package in Windows 10 UWP applications creates the exact same result as installing the “mvvmlightlibs” package.
因此,在Windows 10 UWP应用程序中安装“mvvmlight”软件包会产生与安装“mvvmlightlibs”软件包完全相同的结果。 Because running a script is not allowed, it is not even possible to warn the user.
由于不允许运行脚本,因此甚至无法警告用户。
I will publish more detailed information on how to add the scaffolding to a Windows 10 UWP application manually.
我将发布有关如何手动将脚手架添加到Windows 10 UWP应用程序的更多详细信息。 Stay tuned.
敬请关注。
As of today, he didn't post a full guide yet, but you could try to run the packaged powershell script manually. 截至今天,他尚未发布完整指南,但您可以尝试手动运行打包的PowerShell脚本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.