简体   繁体   English

文件在Visual Studio 2012中显示为隐藏

[英]Files show as hidden in Visual Studio 2012

Hei,

So we have a whole group of people working on the same project and every now and then some files show as hidden, you know the blank file icon like obj or bin. 因此,我们有一群人在同一个项目上工作,时不时地有些文件显示为隐藏,您知道obj或bin这样的空白文件图标。

在此处输入图片说明

See my font and texture? 看到我的字体和纹理? They should be normal. 他们应该是正常的。

So, I can see them in the folder but not in solution explorer without hitting the Show Hidden Files. 因此,我可以在文件夹中看到它们,而在解决方案资源管理器中看不到它们,而无需单击显示隐藏文件。 I can also modify them but I would like them back. 我也可以修改它们,但我希望它们返回。

I have been trying to see if there was a solution but all I get is blogs on how to show hidden files. 我一直在尝试查看是否有解决方案,但我所获得的只是关于如何显示隐藏文件的博客。

So I found this thread Visual Studio 2012 and missing files that seems to be giving the reason of my problem. 因此,我发现该线程Visual Studio 2012和缺少的文件似乎是造成我问题的原因。 People are not saving properly before pushing to github. 人们在推送到github之前没有正确地保存。

Now is there a solution to this?(apart from saving properly) Can I make all of those files become normal files? 现在有解决方案吗?(除了正确保存外)我可以将所有这些文件都转换为普通文件吗?

Cheers 干杯

Simply right click the files/folders and include them to source control again. 只需右键单击文件/文件夹,然后将其包含到源代码管理中即可。

This usually happens if people check in new files/folders but do NOT check in the updated project file, too. 如果人们签入新文件/文件夹但也不签入更新的项目文件,通常会发生这种情况。 The project file contains a list of all files which should be included within the solution. 项目文件包含解决方案中应包括的所有文件的列表。 If this runs out of sync, exactly this crap will happen... ;) 如果此操作不同步,则会发生这种废话……;)

Simply instruct your folks to properly check-in. 只需指示您的同事正确办理登机手续即可。 Or do code review on check-in and verify that the project/solution file(s) are also checked in. 或者在签入时进行代码审查,并验证是否也签入了项目/解决方案文件。

They show up as hidden because they're not part of the project/solution, but they are on your file system. 它们显示为隐藏,因为它们不属于项目/解决方案,但它们位于文件系统中。

You can right-click the files and click Include in Project 您可以右键单击文件,然后单击“ 包含在项目中”

If this does not solve the issue after checking in. The project file is what is not properly getting checked in. 如果这不能解决签入后的问题。项目文件就是未正确签入的文件。

Probably the problem is that they are not pushing the project file (file with extension .csproj). 可能的问题是,他们没有推送项目文件(扩展名为.csproj的文件)。 It holds all references to files included on the project so it needs to be pushed when new files are added. 它包含对项目中包含的文件的所有引用,因此在添加新文件时需要将其推送。

Let everyone know that they need to push this file in order to everyone to catch latest changes on project. 让每个人都知道他们需要推送此文件,以便每个人都可以捕获项目的最新更改。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM