在解决方案资源管理器中隐藏的Form1类文件 [英] Form1 class file hidden in solution explorer
问题描述
我遇到了今天早上出现的问题。我有一个Windows窗体项目,但在Form1中;文件夹,包含我的代码的Form1类文件(通常可以通过双击Form1类文件访问) - 突然从解决方案资源管理器中消失。
我可以通过右键单击Form1文件夹并选择查看代码或按F7来访问它。我已经打开了多个不同的解决方案,但问题仍然存在于所有解决方案Form1类文件夹中显示的唯一文件是Form1.Designer.cs和Form1.resx。
你们知道如何重置;解决方案资源管理器窗口的行为与以前一样?在选择查看后,我附上了我的解决方案资源管理器视图的屏幕截图。
过去看起来如何:
http://i.stack.imgur.com/MykCX.gif [ ^ ]
现在看起来如何(缺少Form1 - 代码视图快捷方式):
http://i.stack。 imgur.com/60oIO.png [ ^ ]
我很期待听到你的想法。
我是什么尝试过:
我试图修复Visual Studio Community 2015,但问题仍然存在。
I have encountered a problem that appeared this morning. I have a Windows Forms project, but within the "Form1"; file folder, the Form1 class file that contains my code (that usually can be accessed in the by double-clicking on the "Form1" class file) - have suddenly disappeared from the Solution Explorer.
I can, however access it by right-clicking on the Form1 folder and selecting "View code" or by pressing F7. I have opened multiple different solutions but the problem remains in all of them. The only files shown within the "Form1"-class folder are Form1.Designer.cs and Form1.resx.
Do you guys have any idea how to "reset"; the Solution Explorer window to behave as before? I attached a screenshots of my Solution Explorer view, after selecting "View".
How it used to look like:
http://i.stack.imgur.com/MykCX.gif[^]
How it looks like now (The "Form1"-code view shortcut is missing):
http://i.stack.imgur.com/60oIO.png[^]
I´m looking forward to hear your thought regarding this.
What I have tried:
I tried to "repair" Visual Studio Community 2015, but the problem remains.
推荐答案
右键单击隐藏文件并将其包含在项目/解决方案中。不知何故,文件被排除在项目之外。
无需重置设置。
Right click on the hidden file and include it to the project/ solution. Somehow the file got excluded from the project.
No need to reset vs settings.
试试这些
点击项目
文件 - >在 Solution Explorer 文本下,cick - >显示所有文件
和刷新
右键单击文件并单击包含在项目中
Try these
Click theProject
File -> under the Solution Explorer text, cick ->show all files
andRefresh
Right click the files and click "Include in project
"
Clean
解决方案再次重建
。
如果仍然存在相同的问题
创建一个新表单并将现有文件中的内容复制粘贴到新表单。
the Solution and Rebuild
again.
If still the same issue persisits
Create a new form and Copy paste the content from existing files to new one.
这篇关于在解决方案资源管理器中隐藏的Form1类文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!