通过 Nuget 安装时,.Net 核心解决方案中的 Nuget 内容文件不会被复制 [英] Nuget Content Files in .Net core solution not getting copied when installing through Nuget

查看:28
本文介绍了通过 Nuget 安装时,.Net 核心解决方案中的 Nuget 内容文件不会被复制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm not able to copy the content static files in my .Net core web application project that I added when creating the nuget package using nuget package explorer. Same thing get copied correctly in .Net framework project template but not in .net core template. I'm using VS 2015 update 3.Am i Missing something here? Any help would be greatly appreciated.

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

Below is my snapshot of content file structure.

推荐答案

有一个nuget 博客文章 关于此内容,目前尚不支持.

There is a nuget blog post about this, and it just isn't supported at this time.

支持的项目类型

此功能仅适用于将安装到使用 project.json 文件管理的项目的包.目前只有两个项目类型由 project.json 管理.

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 应用
  • 可移植类库

contentFiles 选项不适用于其他项目类型.

The contentFiles option is not available for other project types.

很遗憾,这个基本功能已被排除在 .net Core 项目之外.特别是因为支持 PCL,它是 .net Core 项目的子集.

It's really a pity this basic functionality has been excluded from the .net Core projects. Especially because PCL is supported, which is a subset of a .net Core project.

GitHub 上有很多关于此的问题,目前尚不清楚此功能是否会很快恢复.

There are quite some issues on GitHub about this, and it's very unclear whether or not this feature is coming back any time soon.

这篇关于通过 Nuget 安装时,.Net 核心解决方案中的 Nuget 内容文件不会被复制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆