The publish tab gets stuck on an infinite load after right-clicking the project and selecting ‘Publish Web App’:
I have tried: updating, reinstalling, enterprise edition, community edition, deleting publish profiles, and repairing the install
The publish tab gets stuck on an infinite load after right-clicking the project and selecting ‘Publish Web App’:
I have tried: updating, reinstalling, enterprise edition, community edition, deleting publish profiles, and repairing the install
2
Answers
The "Publish" tab on Visual Studio is the worst! It’s a pretty common issue, though, and there are a few things you can try to get unstuck:
Clear Out Publish Profiles and Cache Head to your project folder,
look under Properties/PublishProfiles, and delete any .pubxml files.
Then, clear Visual Studio’s cache by deleting the
ComponentModelCache folder (you can find it in
%LocalAppData%MicrosoftVisualStudio17.0_xxx, where 17.0_xxx
matches your version). Sometimes a fresh start works wonders.
Turn Off Extensions Temporarily Extensions can sometimes throw a
wrench in the publishing process. Go to Extensions > Manage
Extensions, and try disabling anything you don’t absolutely need
right now. If it helps, you’ll know an extension was the culprit.
Run as Administrator A classic! Right-click on the Visual Studio
icon and select “Run as administrator.” Sometimes, those extra
permissions are what it needs to get going.
Reset Visual Studio Settings If Visual Studio’s acting particularly
quirky, you could try resetting it to default settings. Just go to
Tools > Import and Export Settings > Reset all settings. It’s like a
quick refresh for everything.
Clear the MEF Cache Close Visual Studio, delete the
ComponentModelCache folder (as mentioned above), and then restart.
It’s a good fix when Visual Studio gets stuck loading background
components.
Update Everything Make sure both Visual Studio and the .NET SDK are
up-to-date. Just go to Help > Check for Updates in Visual Studio,
and check the .NET website for any SDK updates.
Use the Command Line as a Backup Plan If nothing else works, you can
always try dotnet publish from the command line. If you’re deploying
to Azure, consider setting up a DevOps pipeline as a longer-term
solution.
Hopefully, one of these tips will get things moving again! Let me know how it goes or if anything comes up along the way!
Regarding your issue with the infinite loading of the publish tab, you can try the following methods:
1: You can run Visual Studio in safe mode using the command devenv /safemode and try again.
2: Check whether Live Share has been installed in the VS installer:
Here are some links to similar problems you can refer to: link1, link2.