Home > other >  Error: Visual Studio 2022 "The build must be stopped before the solution can be closed." D
Error: Visual Studio 2022 "The build must be stopped before the solution can be closed." D

Time:07-14

I have a problem with my Visual Studio 2022 and my Solution.

When I open my Visual Studio 2022, and Build the the entire solution my visual studio disable the button to build and show a message when you try to close : "The build must be stopped before the solution can be closed.".

Before the first Build:

After first Build:

When I try to close:

I opened VS with Administrator user.

In my solution I have projects dbml, WPF, C# and WCF.

This last one the WCF projects have a problem. Because when I Build another projects the problem don't happened. But when I build the WCF projects the problem happen.

My task manager show this process:

I tried close one by one to identify the process but i did find.

Only when I force close devenv.exe and open again Visual Studio the build option enable.

Can Someone help me please?

EDIT:

This bug was fixed in version 17.2.6 of Visual Studio 2022. Please if you have this error, please update Visual Studio 2022 to the last version.

https://developercommunity.visualstudio.com/t/Build-doesnt-interrupt-after-build-erro/10038753

https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes#1726--visual-studio-2022-version-1726

CodePudding user response:

Found this bug report in Visual Studio Developer Community Forum. https://developercommunity.visualstudio.com/t/ASPNET-project-Web-Forms-Build-never/10041947

It says that this bug has been fixed and slated for a future release. It also points to another bug report for a workaround.

Until the fix becomes available, here is a workaround that can be used to unblock this scenario:

  1. Install the Feature Flags extension.
  2. From Main Menu -> Tools -> Options -> Feature Flags - check the item "Solution.Services.UseLegacy"
  3. Press Ok and restart Visual Studio.

Another option is to update the value [$RootKey$\FeatureFlags\Solution\Services\UseLegacy] from Microsoft.VisualStudio.FeatureFlags.pkgdef and run devenv /UpdateConfiguration - as described in the discussion above.

CodePudding user response:

This bug was fixed in version 17.2.6 of Visual Studio 2022. Please if you have this error, update Visual Studio 2022 to the last version.

https://developercommunity.visualstudio.com/t/Build-doesnt-interrupt-after-build-erro/10038753

https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes#1726--visual-studio-2022-version-1726

  • Related