Visual Studion 2022 Version 17.6 Hangs on Build\Clean\Rebuild All

samer.alisaleh 86 Reputation points
2023-05-23T12:41:55.2166667+00:00

Hi,

I have upgraded my Visual Studio 2022 to the latest version 17.6.1. Since then when I try to Run\Build project it hangs and I cant do anything to cancel the build except by ending VS from task manager. Please help. This is critical and I cant continue my development.

Thanks

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,126 questions
{count} votes

14 answers

Sort by: Most helpful
  1. Kai 15 Reputation points
    2023-06-28T12:14:51.0733333+00:00

    I have the same issue here. I think it started with 17.6.2 and is still present in 17.6.4. I just tried repairing the installation, as was suggested, but that did not help. Just now it hangs again, cancelling the build will not work, and usually once it is in this state, a reboot of the whole system is required.

    The root cause seems to be a file that is locked and cannot be removed. Trying to delete the affected bin folder hangs the Windows Explorer:

    grafik

    Looking with Process Explorer, the System process is the only one that has a handle on the file in question:grafik

    To be honest, I'm not even certain if this is a Visual Studio problem, or if one of the more recent Windows Update on the machine has an unexpected interaction with Visual Studio. So just in case: Win10 22H2 (Build 19045.2846)

    3 people found this answer helpful.
    0 comments No comments

  2. Василий Пупло 5 Reputation points
    2023-11-12T11:23:47.6333333+00:00

    I stumbled into VS behavior when it hangs 100% of the time.

    Recently, I have updated my Visual Studio to 17.7.6 version (CPP stuff only), and right after update it started to hang during compilation or building my projects. GUI never switched back from grayed out stuff to normal, and clicking Build => Cancel did nothing. And if I choose Compile after Cancel, it threw following error:

    Разрушительный сбой (Исключение из HRESULT: 0x8000FFFF (E_UNEXPECTED)) [StartUpdateSpecificProjectConfigurations @ D:\dbs\sh\ddvsm\1021_222914\cmd\21\src\env\vscore\package\Solutions\BuildManager\SolutionBuildManager.cs:2604]

    I wasn't able to close Visual Studio in normal way at all (if build was started), the only way was to terminate devenv.exe from Task Manager.

    After few hours of trying to resolve the issue, I finally found what was causing it in my case: a decimal separator longer than one character. Windows, in its Control Panel, allows users to set up a custom decimal separator (up to 3 letters), and putting anything that is two symbols or more leads to VS being totally unable to finish compilation with 100% rate.

    I have tested it thoroughly enough, changing decimal separator back to a single char (a dot, a comma etc) fixes the problem immediately, and once separator is more than 1 letter, VS starts to hang again. Changing decimal separator only takes effect after Visual Studio is restarted.

    Hopefully it will help somebody in this thread (probably not, who else sets decimal separator to more than 1 symbol?!).

    1 person found this answer helpful.

  3. kurtd 0 Reputation points
    2023-05-23T20:50:43.6333333+00:00

    I had to revert to 17.5.1 due to roslyn and charp start up issues . Repair failed, now I can't try the new copilot. Lost a whole day of work, which means sleep...


  4. Tianyu Sun-MSFT 30,566 Reputation points Microsoft Vendor
    2023-05-24T04:17:58.79+00:00

    Hello @samer.alisaleh ,

    Welcome to Microsoft Q&A forum.

    I suggest you try to remove the hidden .vs folder(in solution folder) and the ComponentModelCache folders in this directory: C:\Users\username\AppData\Local\Microsoft\VisualStudio\17.0_XXXXXXXX.

    If it doesn’t work, please try to revert to a previous version of VS 2022, for example 17.5.4/17.5.5 as a temporary workaround, and report this issue on our Developer Community for further investigate.

    Besides, the issue @kurtd mentioned, is fixed and pending release, see this thread: RoslynPackage fails to initialize due to SettingsEditorFactory dependency error for details.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  5. Michael Hagesfeld 6 Reputation points
    2023-05-24T16:36:13.3766667+00:00

    tl;dr: This is an overall issue with Visual Studio, NOT a specific version.

    So my coworker was having this issue (specifically that when he ran his .Net 6 web project, then stopped it, he couldn't clean/rebuild, nor in any way delete the created exe file, without restarting his machine). He was on 17.6.1. I downloaded the project, and ran into the same issue. I was on 17.5.3. I saw this note and @Tianyu Sun-MSFT response, and thought "OK, I'll upgrade to 17.4 or 17.5". I couldn't do that, so I figured I'd upgrade to 17.6.1, still have the problem, and roll back.

    However, after installing 17.6.1 - everything worked fine. I mentioned this to my coworker, and eh said he had had a similar experience when he initially upgraded to 17.6.1. SO I am thinking that this is a Visual Studio issue, "solved" by upgrading/rolling back because it cleans out whatever is causing the issue in the first place, NOT by anything specific to a specific version.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.