Visual Studio Enterprise 2022“挂起”随机

发布于 2025-02-03 21:31:45 字数 1851 浏览 4 评论 0原文

在Windows 10 Enterprise上运行的最新版本的Microsoft Visual Studio Enterprise 2022(版本17.2.2)时,我有一个问题(如果很重要的话)。问题在于,视觉工作室在随机时刻“悬挂”,但不是完全。我的意思是它看起来一切都很好,但是我只是无法单击它。我的意思是,例如,当我调试应用程序和vs挂起时,该应用程序运行完全正常,所有内容都显示在VS中,例如断点正常击中。当它发生时,我还可以正常地关闭任务栏,并和平卸下所有东西。就像我说的那样 - 一切都完全正常,但是就像VS在玻璃后面一样。另外,就像我说的那样 - 它是完全随机的,有时在VS在后台时会悬挂,但是当我写作时,它也会发生冻结中文。光标正在闪烁,但我无法输入任何内容,VS不会响应键盘和鼠标点击。

这并不是一个问题,但是这很烦人,尤其是每天几次发生几次,大约每2小时一次。

奇怪的是,它只有在我在特定项目中进行操作时才发生 - 用C#编写的Outlook的VSTO插件(因此标签)。我可以在一个窗口上打开多个窗口(和解决方案),但是当它发生时,只有一个冻结了 - 它是带有VSTO插件的窗口。我不知道解决方案/项目是否有问题,或者是Visual Studio的问题。

像我说的那样 - 这不是一件大事,因为我只能将其从任务栏中关闭令人沮丧,我想修复它。任何帮助将不胜感激。

编辑:一个多月已经过去了,我认为这个问题需要更新。在那个月中,我将所有内容更新到版本17.2.5,Resharper(稍后再介绍)为2022.1.2版(从版本2022.1.0)和Windows到版本21H2。没有任何帮助。但是,我有一些观察,我认为我必须分享。

首先 - 回答Matthew -Watson的问题 - 是的,涉及一个插件,这是上述重音。我感到非常愚蠢,因为自从我开始使用这台PC以来,我完全忘记了我已经安装了它 - 我只是没有使用它。当我开始使用它时(就这个问题而言)发生了变化 - 因为它一直在那里。但是,我不确定是否应该归咎于Resmanper-至少不是完全。我尝试在那个月禁用几次,但似乎很喜欢它有所帮助,因为当它被禁用时没有“冻结”。通常,几个小时后,我将其重新打开 - 我喜欢Resmanper,我宁愿不再使用它。但是我不确定它是否真的有帮助 - 也许碰巧的是,当它被禁用时没有“冻结”,这是纯粹的事故,因为有几天的日子启用了重音,并且没有发生此错误的情况。此外,我办公室中的其他人正在使用与我相同的配置(相同的PC,相同的软件 - 包括相同版本的Visual Studio,Resharper和Windows),并且没有此错误。我开始怀疑我的PC是否被诅咒了...

其次 - 不仅是Office VSTO插件会导致“冻结”(因此我越过该部分)。自从我问这个问题以来,我更改了我积极从事的项目,并观察到该错误也发生在其他项目中。在所有项目中都会发生哪个项目 - 简单的控制台项目,大火项目等。但是,我很确定它在VSTO项目中更频繁地发生。最近,我回到了我以前从事过的VSTO项目,一天中至少发生了5次错误。在其他项目中,它发生稀有。但是 - 正如原始帖子中提到的 - 它是完全随机的。有时候,每30分钟左右一次都不会发生一次。真的很沮丧。但是 - 如前所述 - 由于某种原因,它在Office VSTO插件中更常见。

另外 - 我确实尝试通过从Visual Studio Installer中选择“维修”选项来维修Visual Studio,这无济于事。

在这一点上,我有点放弃了解决它 - 我尝试了所有想到的解决方案,检查了所有问题,但找不到任何东西 - 也不是发生此错误的原因,也不是解决方案。如果至少可以指向在哪里搜索正确的日志以及如何调试此问题,我会很感激。

编辑2:另外2周已经过去了,我很遗憾地告诉您,这个问题必须保持尚未解决。我已经离开了为有这个问题的公司工作的公司,因此我无法测试任何解决方案。尤其是只有我才遇到了这个“冻结”问题,因此我无法要求我的前工作同事确认这里发布的任何解决方案都设法解决了这个谜团并解决了问题。

如果有人遇到同样的问题,希望您能够解决它并与我们分享一些细节。我真的很好奇可能导致它。

I have a problem when using latest version of Microsoft Visual Studio Enterprise 2022 (version 17.2.2) running on Windows 10 Enterprise (Version 10.0.19044 Build 19044, if that matters). The problem is that the Visual Studio "hangs" at random moments, but not completely. By that I mean that it looks like everything's fine with it, but I just can't click it. By fine I mean that for example when I'm debugging an application and VS hangs, the app is running completely normal, everything's showing up in VS and for example breakpoints are hit normally. When it happens, I can also close VS from the task bar normally and it unloads everything peacefully. Like I said - everything's completely normal, but it's like VS is behind a glass. Also, like I said - it's completely random and sometimes it hangs when VS is in the background, but it also happens when I'm writing and it freezes mid word. The cursor is flashing, but I can't type anything and VS doesn't respond to keyboard and mouse clicks.

It's not that big of a problem, but it is quite annoying nevertheless, especially when it happens few times a day, about once every 2 hours.

The weird thing about it is that it only happens when I'm doing stuff in a specific project - a VSTO plugin for Outlook written in C# (hence the tags). I can have multiple windows (and solutions) opened at one, but when it happens, only one of them freezes - and it's the window with the VSTO plugin for Outlook. I don't know if that's the problem with the solution/project or if it's something with Visual Studio.

Like I said - it's not that big of a deal, as I can just close it from the taskbar, but it is quite frustrating and I'd like to fix it. Any help would be appreciated.

EDIT: More than a month has passed and I think this question needs to be updated. During that month I updated everything - Visual Studio to version 17.2.5, ReSharper (more on that later) to version 2022.1.2 (from version 2022.1.0) and Windows to version 21H2. And nothing helped. However I have some observations that I think I have to share.

First of all - answering matthew-watson's question - yes, there is a plugin involved and it's the aforementioned ReSharper. I feel quite stupid, because I completely forgot that I had it installed since I started using this PC - I just didn't use it. When I started using it nothing (in terms of this question) has changed - because it has always been there. However I'm not sure if ReSharper is here to blame - at least not completely. I tried disabling it few times during that month and it seemed liked it helped, because there were no "freezes" when it was disabled. Usually after few hours I turned it back on - I like ReSharper and I'd rather not stop using it. But I'm not sure it really helped - maybe it is just so happened that there were no "freezes" when it was disabled, that it was pure accident, as there were days when ReSharper was enabled and there were no occurrences of this bug. Moreover other people in my office are using the same configuration as me (same PC, same software - including the same version of Visual Studio, ReSharper and Windows) and they don't have this bug. I'm starting to wonder if my PC is cursed...

Secondly - it's not just Office VSTO plugins that cause those "freezes" (hence I crossed that section out). Since I asked this question I changed the project that I'm actively working on and observed that the bug also happens in other projects. It doesn't matter what project, it happens in all of them - simple console projects, Blazor projects etc. However I am quite sure that it happens more often in VSTO projects. Recently I came back to the VSTO project I had been working on previously and the bug happened at least 5 times on one day. In other projects it happens rarer. Though - as mentioned in the original post - it is completely random. There are days when it doesn't happen at all and days when it happens every 30 minutes or so. It's really frustrating. But - as mentioned - it happens more often in Office VSTO plugins for some reason.

Also - I did try repairing Visual Studio by choosing "Repair" option from Visual Studio Installer - it didn't help.

At this point I kinda gave up on solving it - I tried every solution that came to my mind, checked everything and I couldn't find anything - neither a reason for this bug to happen, nor a solution. If one could at least point to where to search for the correct logs and how to debug this problem, I would be thankful.

EDIT 2: Another 2 weeks have passed and I'm sad to have to tell you that this question will have to remain unsolved. I have left the company that I worked for in which I had this problem and so I won't be able to test any solution. Especially that it was only I that got this "freezing" problem, so I won't be able to ask my ex-work colleagues to confirm that any solution posted here managed to solve the mystery and fix the problem.

If anyone gets the same problem, I hope you will be able to fix it and share some details with us. I'm really curious as to what might have been causing it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情感失落者 2025-02-10 21:31:46

我遇到了类似的问题,很烦人。

可能的原因:

1.您安装了CASCADE MONO字体或其类似字体或某种原因。

2.您安装了Windows终端,而Windows终端安装CASCADE MONO Font会自动。

Windows Terminal是下面的Windows Terminal:

”

3. inlay提示resharper中使其卡住。

第3点的解决方法可以参考:

Sergey Kuks的答复-Youtrack.jetbrains.com (内部“ Resharper Options”中的设置屏幕截图

。 > CASCADE MONO 字体,再次检查。

I met similar issue, so annoying.

Possible reasons:

1.You installed Cascade Mono font or its similar fonts by some reason.

2.You installed Windows Terminal, while Windows Terminal installs Cascade Mono font automatically.

Windows Terminal is this guy below:

Windows Terminal

3.The Inlay Hints function in ReSharper makes it stuck.

The workaround of point 3 can be referred to:

Sergey Kuks's reply - youtrack.jetbrains.com (screen shots for settings in "ReSharper Options" inside.)

Then uninstall Windows Terminal, uninstall Cascade Mono font, check again.

仲春光 2025-02-10 21:31:46

面临这个问题,不确定为什么。尝试修复和更新安装,以及Google结果的一些建议,没有运气。

事件查看器显示此路径应用程序路径:c:\ program Files \ Microsoft Visual Studio \ 2022 \ Community \ Commun7 \ common7 \ ide \ devenv.exe

然后意识到我已经在解决方案中添加了150,000张图像,所以IDE崩溃了。删除的图像,将文件夹排除在解决方案中,然后再次添加图像,现在没有问题。
可能需要检查并考虑的东西。

Was facing this issue and wasn't sure why. Tried repairing and updating installation along with a few suggestions from google results with no luck.

Event viewer revealed this path Application Path: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe

Then realized that I had added 150,000 images into the solution, so the ide was having a meltdown. Deleted images, excluded the folder from the solution then added images again and now no issue.
Something to maybe check and consider.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文