简体   繁体   English

Nuget 3.2.0不在项目中添加其他文件/文件夹

[英]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.

相关问题 如何将其他文件添加到 nuget package 并在 nuget ZEFE90A8E604A7C67D803A 代码中引用这些文件? - How to add additional files to a nuget package and reference those files within the nuget package code? 构建后,Unity3d在项目文件夹中看不到XML文件 - Unity3d don't see the XML files in project folder after build 不要在VS Project中看到属性文件夹 - Don't See Properties Folder in VS Project Nuget软件包管理器未添加任何参考 - Nuget package manager don't add any reference 当NET Framework项目具有对netstandard项目的项目引用时,带有-IncludeReferencedProjects标志的nuget pack不起作用 - nuget pack with -IncludeReferencedProjects flag don't work when NET Framework project has project reference to netstandard project 为什么我不需要在测试类文件中添加我的主项目的命名空间? - Why don't I need to add my main project's namespace in the test class files? 如何在 Visual Studio 2017 中向 NuGet 包添加其他文件? - How do you add additional files to a NuGet package in Visual Studio 2017? 如何使用nuget.core将nuget包添加到c#项目文件 - How to add nuget packages to c# project files with nuget.core 如何在NuGet包中使用其他文件? - How to use additional files in NuGet package? 已安装nuget,但在工具中看不到菜单选项“添加库包参考” - Installed nuget, but don't see the menu option Add Library Package Reference in tools
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM