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

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

问题描述

我无法在使用nuget软件包浏览器创建nuget软件包时添加的.Net核心Web应用程序项目中复制内容静态文件.在.Net Framework项目模板中可以正确复制相同的内容,但在.net核心模板中不能正确复制相同的内容.我正在使用VS 2015 Update 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.

推荐答案

有一个有关此内容的裸体博客帖子,但目前尚不支持.

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

支持的项目类型

Supported Project Types

此功能仅适用于将安装到使用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,而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天全站免登陆