asp.net-core - 通过 Nuget 安装时,.Net 核心解决方案中的 Nuget 内容文件不会被复制

标签 asp.net-core nuget nuget-package

我无法复制使用 nuget 包资源管理器创建 nuget 包时添加的 .Net 核心 Web 应用程序项目中的内容静态文件。同样的事情在 .Net 框架项目模板中被正确复制,但在 .net 核心模板中没有。我正在使用 VS 2015 更新 3.我在这里遗漏了什么吗?任何帮助将不胜感激。

下面是我的内容文件结构快照。

enter image description here

最佳答案

有一个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/

相关文章:

asp.net - 无法将 NuGet 包 "Microsoft ASP.NET MVC"从版本 4.0.20710.0 更新到 5.1.2

.net - 面向 .net 4.7.1 的项目无法引用依赖于 .net standard 2.0 的 NuGet 包

windows - Json.net 无法在 visual studio 2012 中安装

.NET 标准程序集 : create nuget packages that can be used by . NET Core 和由本地 Nuget.Server 托管的完整 .NET

.net - NuGet 的还原包坚持特定的包版本

c++ - nuget 包管理器包含在 VS 2015 中设置的目录在哪里?

c# - SignInManager.IsSignedIn(User) 与 User.Identity.IsAuthenticated

asp.net-core - 覆盖 asp.net core razor 页面中的 razor View

Azure 机器人 channel 错误 "There was an error sending this message to your bot: HTTP status code Unauthorized"

c# - 使用 LINQ 查询语法 EF Core C# 的左外部联接