gpt4 book ai didi

Visual Studio Solution Explorer not showing files and folders(Visual Studio解决方案资源管理器不显示文件和文件夹)

转载 作者:bug小助手 更新时间:2023-10-27 20:53:07 26 4
gpt4 key购买 nike



Suddenly my solution tab stopped working on my Visual Studio 2013. Even it is existing project or brand new project it does not show files and folders in Solution Explorer. (File is attached)

突然,我的解决方案选项卡在我的Visual Studio 2013上停止工作。即使是现有项目或全新项目,它也不会在解决方案资源管理器中显示文件和文件夹。(文件已附上)



I tried to reset settings, restarted PC but did not work.
http://msdn.microsoft.com/en-us/library/ms247075(v=vs.100).aspx

我尝试重置设置,重新启动PC,但不起作用。Http://msdn.microsoft.com/en-us/library/ms247075(v=vs.100).aspx



I did not installed any new extensions recently I was working what ever I had for a while.

我最近没有安装任何新的扩展,我一直在做我有一段时间的工作。



Is there anything else I can do?

还有什么我能做的吗?



enter image description here



Update;

更新;



I am also getting this weird message when I click options Icon:

我也得到这个奇怪的消息,当我点击选项图标:



enter image description here


更多回答

Check this out: hjerpbakk.com/blog/2014/7/25/…. To quote... "This issue is because of a MEF cache corruption. Installing the feedback extension (or installing any extension) will invalidate the cache causing VS to rebuild it."

查看详情:hJerpbak.com/Blog/2014/7/25/…。引用一下……“此问题是由于MEF缓存损坏造成的。安装反馈扩展(或安装任何扩展)将使缓存无效,从而导致VS重新生成它。”

Thanks for redirection, works now! I think you can post your comment as an answer which is totally working now :)

感谢您的重定向,现在起作用了!我认为你可以发布你的评论作为回答,现在完全奏效了:)

Glad I could help! I'll post the comment as answer.

很高兴能帮上忙!我会把这条评论贴出来作为回答。

Related - stackoverflow.com/questions/32540237/…

相关-STACKOVERFLOW.com/Questions/32540237/…

优秀答案推荐

Check this out: http://www.hjerpbakk.com/blog/2014/7/25/no-content-in-solution-explorer-using-visual-studio-2013

看看这个:http://www.hjerpbakk.com/blog/2014/7/25/no-content-in-solution-explorer-using-visual-studio-2013



To quote... "This issue is because of a MEF cache corruption. Installing the feedback extension (or installing any extension) will invalidate the cache causing VS to rebuild it."

引用一下……“此问题是由于MEF缓存损坏造成的。安装反馈扩展(或安装任何扩展)将使缓存无效,从而导致VS重新生成它。”



Link to bug report: https://connect.microsoft.com/VisualStudio/feedback/details/794111/no-exports-were-found-that-match-the-constraint-contract-name

错误报告链接:https://connect.microsoft.com/VisualStudio/feedback/details/794111/no-exports-were-found-that-match-the-constraint-contract-name



Just to get the answer here on the same page as the question: users should install (or uninstall) an extension to Visual Studio as this will force a rebuild of the MEF cache. The linked article suggested installing the Microsoft Visual Studio 2013 Feedback Tool extension, which I did do and it worked, but any extension installed through the Tools, Extensions and Updates menu would probably do the job.

只需在与问题相同的页面上获得答案:用户应该安装(或卸载)一个对Visual Studio的扩展,因为这将强制重新构建MEF缓存。这篇链接的文章建议安装Microsoft Visual Studio 2013反馈工具扩展,我确实这样做了,而且它起作用了,但通过工具、扩展和更新菜单安装的任何扩展都可能完成这项工作。



I think the cause of this might have been related to an overzealous anti-virus program, but I can't say for sure.

我认为这可能与一个过于热心的反病毒程序有关,但我不能肯定。



Rebuilding didn't work for me, and I wasn't keen on installing another extension.

重建对我来说不起作用,我也不热衷于安装另一个扩展。


Got it to work in the following three steps:

通过以下三个步骤使其发挥作用:



  1. Click "Show All Files" in solution explorer (in bar above search bar)
    Image showing location of Show All Files

  2. Right click folder that was previously missing, select "Include In Project"

  3. Click (unselect) "Show All Files" in solution explorer.



it worked to click "show all files" in the Solution explorer!

它可以在解决方案资源管理器中单击“显示所有文件”!



As this issue is because of a MEF cache corruption. Just delete your .vs folder and re-open your solution.

由于此问题是由于MEF缓存损坏。只需删除.vs文件夹并重新打开解决方案。



For future Googlers / related issue in 2023, "Explorer" was not showing up for me in the sidebar at all. No way to view files and folders.

对于2023年谷歌用户/相关问题的未来,“探索者”根本不会出现在侧边栏中。无法查看文件和文件夹。


I had to delete the C:\Users\%username%\AppData\Roaming\Code\User\globalStorage folder to get it to show up.

我不得不删除C:\Users\%username%\AppData\Roaming\Code\User\globalStorage文件夹才能让它显示出来。



Even, it will work if you clear your local app data for visual studio.
%temp% AppData\Roaming\Microsoft\VisualStudio.
%temp% AppData\Local\Microsoft\VisualStudio.
Delete the files and restart your visual studio.

甚至,如果您清除本地应用程序数据以用于Visual Studio,它也会起作用。%Temp%AppData\Roaming\Microsoft\VisualStudio。%Temp%AppData\Local\Microsoft\VisualStudio。删除文件并重新启动您的Visual Studio。




  1. Copy and paste the folders and files at the project location for integrating the project module and build the project even though namespace has correct. This are the way to resolve


  2. The file/folder is not visible proper so Right-click
    enter image description here improper visible file/folder and click the Include in Project


  3. Build the project -> If any error occur then it like namespace may be error because copy from one project to another project or else same project with different location so that check it


  4. If the error like Build action 'Page' is not supported by the specific combination of the project's targets.


  5. Go and resolve by further steps enter image description here




This worked for me:

这对我来说很管用:



  1. Right-click on the project

  2. Rebuild



with VS 2022 most of you must be trying to create a .NET 6 framework solutions. But you need to install the .NET 6 sdk separately for your projects to be listed under solution.

在VS2022中,你们中的大多数人肯定都在尝试创建一个.NET6框架解决方案。但是,您需要单独安装.NET6SDK,才能使您的项目列在解决方案下。


Installing .NET 6 SDK, resolved my issue.

安装.NET 6 SDK,解决了我的问题。



I came across this post looking for a solution about some methods not being found on Solution Explorer. Just in case, VS 2022 has options to search for methods within File Contents, see image below, activating this option my issue was solved:

我看到这篇文章是为了寻找有关解决方案资源管理器中找不到的某些方法的解决方案。以防万一,VS 2022有在文件内容中搜索方法的选项,请参见下图,激活此选项我的问题已解决:


enter image description here



Open the Solution Explorer and click on Show All Files Button, it will show the files which were there in your project and you were unable to see them. Then if you want to include them in your project, select the folder and right-click on it and select Include in the project.

打开解决方案资源管理器并单击显示所有文件按钮,它将显示您的项目中存在但您无法查看的文件。然后,如果您想要将它们包含在项目中,请选择该文件夹并右键单击它,然后选择Include in the Project。


更多回答

Personally, rather than install an unwanted extension, I just updated an extension on the update list (I generally have at least one item that needs updating!). That work as well.

就我个人而言,我没有安装不需要的扩展,只是在更新列表上更新了一个扩展(我通常至少有一个项目需要更新!)。这也很管用。

You might consider installing this extension: marketplace.visualstudio.com/…

您可以考虑安装此扩展:marketplace.visualstudio.com/.

When I followed this advice, I got a popup: "No exports were found that match the constraint contract name" and could not proceed. Searching on that message lead me to the recommendation to delete the VS Component Model folder, which resolved all problems for me.

当我遵循这个建议时,我得到了一个弹出窗口:“没有找到与约束合同名称匹配的导出”,并且无法继续。搜索这条消息,我得到了删除VS组件模型文件夹的建议,这解决了我的所有问题。

Best and quickest way if you don't care about vs config for the local project in that directory. Thanks.

如果您不关心该目录中本地项目的VS配置,那么这是最好、最快的方法。谢谢。

Needs more work/steps. Of course if you copy a XAML page from one project to another, you're going to have namespace issues. I tried pulling in another page into a project where it was not reading files below the first folder level. If I added it to the project root, it added fine. If I added it to a folder, it could not see the file. So I doubt wherever you put files that the Solution Explorer is going to miraculously pick them up - you have to tell it to load them by doing "Add Existing Item" in VS and point at them.

需要更多的工作/步骤。当然,如果您将XAML页面从一个项目复制到另一个项目,您将遇到名称空间问题。我试着将另一个页面拉入一个项目,它没有读取第一个文件夹级别以下的文件。如果我把它添加到项目根目录,它会添加得很好。如果我把它添加到一个文件夹,它就看不到这个文件。所以我怀疑无论你把文件放在哪里,解决方案资源管理器都会奇迹般地把它们捡起来--你必须告诉它通过在VS中执行“添加现有项”来加载它们,并指向它们。

As FYI for any that are curious, I solved my issue by ensuring that I could open folders in Solution Explorer and see subitems from another project in a separate VS, so I knew I didn't have a VS-wide problem. So I just re-created a new project and moved my files into them, created new references again, etc. But then it started again after building my project. So I had files in multiple namespaces. Once I got them all in one namespace and restarted VS, everything worked again.

对于任何好奇的人来说,作为参考,我通过确保我可以在解决方案资源管理器中打开文件夹并在单独的VS中查看另一个项目的子项来解决我的问题,所以我知道我没有VS范围的问题。所以我只是重新创建了一个新项目,并将我的文件移到其中,再次创建新的引用,等等。但在构建我的项目后,它再次启动。所以我将文件放在多个名称空间中。一旦我将它们都放在一个命名空间中并重新启动VS,一切都会再次正常工作。

Sorry, @Nupur, it would be nice if that was working in the case of the original poster's circumstance, but it's clearly not.

抱歉,@Nupur,如果这在最初的发帖人的情况下能起作用就好了,但显然不是。

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com