简体   繁体   English

对于.cs文件,Visual Studio 2015解决方案资源管理器中的虚线文件图标的含义是什么?

[英]What is the meaning of the dotted file icon in Visual Studio 2015 Solution Explorer for a .cs File?

What does this dotted file icon mean? 这个虚线文件图标是什么意思? It's a .cs file but it is not behaving right in my project and I've noticed this separate icon in Solution Explorer: 这是一个.cs文件,但它在我的项目中表现不正常,我在解决方案资源管理器中注意到了这个单独的图标:

在此输入图像描述

I've checked the MSDN Documentation in three places 我已经在三个地方检查了MSDN文档

Another page at MSDN MSDN的另一页

Yet another page at MSDN 在MSDN的另一页

I've also checked the Visual Studio Documentation itself, which is rather obscurely organized. 我还检查了Visual Studio文档本身,它本身就是模糊不清的。

I've even checked this website: 我甚至查过这个网站:

堆栈溢出搜索

Lastly, I found this topic with a similar question but both the question page and the references inside do not have this icon . 最后,我发现这个主题有一个类似的问题,但问题页面和里面的引用都没有这个图标 Thanks for your help. 谢谢你的帮助。

This means that the file isn't included in the project. 这意味着该文件未包含在项目中。 You're only seeing it because you turned on Show All Files. 你只是看到它,因为你打开了显示所有文件。

You should right-click the file and click Include in Project. 您应该右键单击该文件,然后单击“包含在项目中”。

You have " Show all files " checked. 您已选中“ 显示所有文件 ”。

The dotted lines indicate files that have not been added to your project. 虚线表示尚未添加到项目中的文件。

Right click on the file and click "Include in project" to include the file in your project. 右键单击该文件,然后单击“包含在项目中”以将该文件包含在项目中。

That "dotted" icon mean that that file is not a part of your project or it is hidden and it is not included in your project. 该“虚线”图标表示该文件不是您项目的一部分,或者它是隐藏的,并且它不包含在您的项目中。

That "dotted" icon is pretty similar to the icon in Solution Explorer called "Show all files". “点”图标非常类似于解决方案资源管理器中名为“显示所有文件”的图标。 When you click on it you can see all the files and maybe you click on it or you have some issue and your file is not included in the project. 当您单击它时,您可以看到所有文件,也许您单击它或者您遇到了一些问题,并且您的文件未包含在项目中。

To include it you can right click one of those files go to Include In Project and that will add it to the project, which declares it in the manifest of your project. 要包含它,您可以右键单击其中一个文件转到Include In Project ,然后将其添加到项目中,该项目在项目的清单中声明它。 You can do it like this: 你可以这样做:

在此输入图像描述

它不包含在您的项目中和/或隐藏。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 解决方案资源管理器未显示表单 cs 文件 - Visual studio solution explorer not showing form cs file 解决方案资源管理器中的 Visual Studio 2017 锁定文件 - Visual Studio 2017 lock file in solution explorer 配置文件未出现在 Visual Studio 的解决方案资源管理器中 - Config file not appearing in solution explorer in visual studio Visual Studio 2015中的AutoMapper CS文件非常慢 - AutoMapper CS File Extremely Slow in Visual Studio 2015 如何在visual studio 2015的解决方案打开事件中创建.txt文件? - How to create .txt file on solution opening event of visual studio 2015? 在Visual Studio 2015中打开解决方案时出现错误的文件路径 - Wrong File Path when Opening a Solution at Visual Studio 2015 如何在运行时将 c# 文件添加到 Visual Studio 解决方案资源管理器? - How to add a c# file to Visual Studio Solution Explorer at runtime? 如何在visual studio 2013解决方案资源管理器中获取文件路径? - How to get a file path in visual studio 2013 solution explorer? MonoDevelop解决方案文件和Visual Studio解决方案文件之间有什么区别? - What is the difference between a MonoDevelop solution file and a Visual Studio Solution file? 在Visual Studio解决方案资源管理器中将菜单项添加到.cs文件(仅)? - Add menu item to .cs files (only) in Visual Studio solution explorer?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM