我无法复制使用 nuget 包资源管理器创建 nuget 包时添加的 .Net 核心 Web 应用程序项目中的内容静态文件。同样的事情在 .Net 框架项目模板中被正确复制,但在 .net 核心模板中没有。我正在使用 VS 2015 更新 3.我在这里遗漏了什么吗?任何帮助将不胜感激。
下面是我的内容文件结构快照。
最佳答案
有一个nuget blog post关于这一点,目前不支持。
Supported Project Types
This feature is only for packages that will be installed to projects that are managed using a project.json file. Currently only two projects types are managed by a project.json.
- UWP apps
- Portable class libraries
The contentFiles option is not available for other project types.
很遗憾,这个基本功能已被排除在 .net Core 项目之外。特别是因为支持 PCL,它是 .net Core 项目的一个子集。
GitHub 上有很多关于此的问题,目前还不清楚此功能是否会很快恢复。
关于asp.net-core - 通过 Nuget 安装时,.Net 核心解决方案中的 Nuget 内容文件不会被复制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40469058/