Nuget 3.2.0 不在项目中添加额外的 files/folder
Nuget 3.2.0 don't add additional files/folder in project
自从最近更新了 Nuget 包管理器(我猜是从 2.9 到 3.2.0),通过 nuget 安装包不再添加包的附加文件。它只是添加库,更新 "project.json" 和类似的东西。
例如:将 MVVMLight 安装到项目中会将 Models、ViewModels 和 Views 文件夹添加到项目中。此外,它还会将 MainViewModel.cs、ViewModelLocator.cs 添加到 ViewModels 文件夹。现在 files/folders 中的 none 已添加到项目中。
任何建议都会有所帮助
从 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可能会重新启用此功能。
MVVM Light 的 Laurent Bugnion 也意识到了这个问题:
Caution: Full package in Windows 10 Universal applications (UWP)
There is a known issue when you install the “mvvmlight” package in
Windows 10 universal applications. 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. Because
of this, installing the “mvvmlight” package in Windows 10 UWP
applications creates the exact same result as installing the
“mvvmlightlibs” package. 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. Stay tuned.
截至今天,他还没有 post 完整的指南,但您可以尝试 运行 手动打包 powershell 脚本。
自从最近更新了 Nuget 包管理器(我猜是从 2.9 到 3.2.0),通过 nuget 安装包不再添加包的附加文件。它只是添加库,更新 "project.json" 和类似的东西。
例如:将 MVVMLight 安装到项目中会将 Models、ViewModels 和 Views 文件夹添加到项目中。此外,它还会将 MainViewModel.cs、ViewModelLocator.cs 添加到 ViewModels 文件夹。现在 files/folders 中的 none 已添加到项目中。
任何建议都会有所帮助
从 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可能会重新启用此功能。
MVVM Light 的 Laurent Bugnion 也意识到了这个问题:
Caution: Full package in Windows 10 Universal applications (UWP)
There is a known issue when you install the “mvvmlight” package in Windows 10 universal applications. 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. Because of this, installing the “mvvmlight” package in Windows 10 UWP applications creates the exact same result as installing the “mvvmlightlibs” package. 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. Stay tuned.
截至今天,他还没有 post 完整的指南,但您可以尝试 运行 手动打包 powershell 脚本。