Reputation: 1959
I recently got into a strange problem, it seem to have happen randomly.
When I make changes inside a XAML-file (It can be anything, change text in a button, change color of background etc.) my visual studio hangs when starting my program.
Does anyone know how to fix this really annoying problem?
Upvotes: 12
Views: 7947
Reputation: 71
If these questions match your situation, then follow this solution.
If you answered yes to all three questions then delete or disable each extension (themes included), then re-enable one by one as you test the project.
For me was the theme extension.
Let me know if you need further assistance.
Upvotes: 0
Reputation: 395
I tried with a different project I had and I could open XAML and run my project.
So I figured it was not visual studio but my actual project.
What worked for me was deleting bin, obj and vs from each project.
Then reopen, rebuild, and now I can open XAML again, and run the project fine.
Upvotes: 0
Reputation: 1
I experienced the same issue. VS2015 would either hang for about 40 seconds or crash sometimes when closing the XAML designer. After uninstalling the extension CodeMaid the issue was gone.
Upvotes: 0
Reputation: 23
It is an older question, I know, but since others have similar issues in older and newer versions of Visual Studio, maybe the following workaround may help (tested on three PCs, VS 2017, Windows 10):
I had no crashes/freezes since changing the compatibility settings.
Good luck!
Upvotes: 0
Reputation: 5205
In my case, I deleted all generated files along with .db and .opendb files and the xaml editing stopped to hang up.
Upvotes: 0
Reputation: 1959
I posted a thread about this on MSDN's forum too, and I got an answer which did the trick:
Apparently I had to delete the Project Solution file and then run the .csproj file.
Don't really know why but this made it work again! So if anyone has been experiencing this problem, try the solution above.
EDIT:
Upvotes: 10
Reputation: 8798
A tip from that page that helped in my case ...
Disabling effects rendering (the fx button at the bottom left of the xaml editor) caused a significant performance boost.
Also, deleting the .suo
file can sometimes fix a lot of Visual Studio problems. In VS2015 just delete the .vs
folder at the root of the solution, that's where the .suo
file lives.
Upvotes: 2
Reputation: 3871
I've had the same problem and for me it was Resharper causing it. Try to suspend Resharper and uninstall all third-party add-ins if it doesn't help (resharper, ghostdoc etc.)
Also try to run VS with /SafeMode flag and see if it works properly.
Upvotes: 1