如何从.NET Core/Standard项目中排除文件/文件夹? [英] How do I exclude files/folders from a .NET Core/Standard project?

查看:59
本文介绍了如何从.NET Core/Standard项目中排除文件/文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在.NET Core和.NET Standard项目中,如果将文件和文件夹放在项目目录中,则Visual Studio会自动将它们拾取;本质上,它们是项目的一部分.

In .NET Core and .NET Standard projects, if you put files and folders within the project directory, they are automatically picked up by Visual Studio; essentially they are part of the project.

如果我在其中没有真正属于项目本身的文件/文件夹(就代码或内容而言)怎么办-如果不完全删除它们,有什么办法可以像我一样将它们从项目中排除可以针对整个.NET Framework的项目吗?

What if I have files/folders in there that aren't really part of the project itself (in terms of code or content) - short of removing them altogether, is there a way I can exclude them from the project as I can with projects targeting the full .NET Framework?

推荐答案

在Visual Studio中打开项目,然后在解决方案资源管理器"中右键单击文件和文件夹.选择Exclude from Project.

Open the project in Visual Studio, and right click the files and folders in Solution Explorer. Choose Exclude from Project.

这正是您针对面向.NET Framework的项目所做的.

That's exactly what you do for projects targeting .NET Framework.

这篇关于如何从.NET Core/Standard项目中排除文件/文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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