Reputation: 12577
I have all extensions disabled, and only 1 Sql Project open. Yet Visual Studio hangs whenever I close a SQL file.
Versions affected:
- 2017 Enterprise
- 2015 Enterprise
During this "hang time" Visual Studio possesses a Not Responding status.
It also appears that the amount of time it stays locked is correlated to the number of files being closed/are open.
EDIT: Reproducable with devenv in SafeMode
Thoughts?
Upvotes: 13
Views: 1707
Reputation: 408
Open MS Ticket: https://developercommunity.visualstudio.com/content/problem/67789/visual-studio-hangs-when-closing-sql-files.html
The real solution will come with an update from MS. For now, however, turning off my participation in the ‘Visual Studio Experience Improvement Program’ seemed to solve it.
You can check whether or not you're signed up for this program by clicking on Help -> Send Feedback -> Settings (in 2017, not sure about 2015).
EDIT: A ticket with Microsoft is open and can be found here:
Upvotes: 23
Reputation: 578
The workaround for me was:
Updating these extensions:
Disabling/re-enabling the following extensions on VS 2017 Enterprise:
While I was trying to figure out which extension was causing the hang, I couldn't identify the specific one. Anyway, this approach worked and I have all three extensions enabled now.
This is all very strange, because I left my workstation turned on on last friday, with VS opened. And this monday morning it just started hanging when trying to open any .sql file, even when the file was empty.
Upvotes: 0
Reputation: 1
It appears that VS is generating a Windows Error Report (WER) event when a .sql file window is closed:
Fault bucket , type 0
Event Name: VisualStudioNonFatalErrors2
Response: Not available
Cab Id: 0
Problem signature:
P1: devenv.exe
P2: 15.0.26430.12
P3: vs.platform.hwndwrapper.destroy-window-error
P4: unknown
P5: Microsoft.VisualStudio.Shell.15.0
P6: Microsoft.VisualStudio.PlatformUI.HwndWrapper.DestroyWindowCore
P7: unknown
P8: unknown
P9: unknown
P10: unknown
These correlate to each attempt to close a window. Unchecking the build/deploy boxes in the Build Configuration Manager don't seem to help (I'm running VS 2017 Enterprise).
Running procmon shows an 11 second delay on my machine in closing a single window after the handle to wermgr.exe is closed:
12:19:31.2071581 AM devenv.exe 6564 CloseFile C:\Windows\SysWOW64\wermgr.exe SUCCESS
12:19:32.7423468 AM devenv.exe 6564 Thread Exit SUCCESS Thread ID: 16288, User Time: 0.0000000, Kernel Time: 0.0000000
12:19:36.6511179 AM devenv.exe 6564 Thread Create SUCCESS Thread ID: 8576
12:19:38.1531428 AM devenv.exe 6564 Thread Exit SUCCESS Thread ID: 8576, User Time: 0.0000000, Kernel Time: 0.0000000
12:19:42.7939996 AM devenv.exe 6564 Thread Create SUCCESS Thread ID: 12052
12:19:42.7952451 AM devenv.exe 6564 Thread Exit SUCCESS Thread ID: 12052, User Time: 0.0000000, Kernel Time: 0.0000000
12:19:42.7953980 AM devenv.exe 6564 Thread Create SUCCESS Thread ID: 6892
12:19:42.7984705 AM devenv.exe 6564 RegQueryKey HKLM SUCCESS Query: HandleTags, HandleTags: 0x0
This appears to be a product bug with no known workaround at this time.
Upvotes: 0