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

查看:52
本文介绍了如何从 .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 中打开项目,然后在解决方案资源管理器中右键单击文件和文件夹.选择从项目中排除.

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天全站免登陆