Visual Studio 2017 Freeze when generating migration scripts
I have a moderately sized project with 3 different Ready Roll projects included. When building other projects in the solution Visual Studio will periodically kick off a build of one or more of the Ready Roll projects which then often freeze when building a package file, which it will try to do even if SQLCMD Packages are not enabled. It is becoming very frustrating as I can't run our Unit Tests at this moment because it tries to build one of the Ready Roll Projects and never completes the Package.
Tagged:
Comments
Can you please try the following troubleshoot steps:
1 - Launch Visual Studio and close the ReadyRoll DbSync tool-window (if it is open).
2 - Close and re-launch Visual Studio. These first two steps ensure that the tool-window is not automatically loaded on startup (although it may still re-appear in the tab list)
3 - Open the solution containing the RR project (rather than creating a new project)
4 - Did this cause Visual Studio to freeze? If not, continue onto these steps:
5 -Launch Visual Studio and open the ReadyRoll DbSync tool-window (from the View menu)
6 - Once the tool-window has opened, open the solution containing the RR project.
Did VS freeze this time?
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Thank you for your reply. Just to be sure we are on the same page, VS doesn't freeze/get stuck when opening projects but sometimes when I try to build the solution or run tests and I have Ready Roll projects in the Solution.
That said, I did go through your steps and discovered that if I do them I can do one rebuild. If I try a build again without out doing them it'll freeze on one of the Ready Roll projects.
Also, regardless of doing them, it'll freeze when I try to run Unit Tests (which does a build of supporting projects behind the scenes).
Finally, if I log out of Ready Roll and then do a build, it'll get stuck regardless.
Thanks for any help you can give.
Are you using a Virtual Machine?
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Can you please edit their ProjectName.sqlproj file and add the following:
<PropertyGroup>
<AllowCancel>False</AllowCancel>
</PropertyGroup>
Does the build still freeze in VS after this addition?
Thank you,
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
I added that to the sqlproj files as suggested and it seems to have addressed the issue. I've only done some minor testing, but so far it hasn't frozen on me. I'll reply again if my testing runs into any other problems.
I'm curious what was occurring behind the scenes. Do you think you can explain why this fixed it?
Regardless, thank you for taking the time to troubleshoot it.
Thanks for coming back and confirming that the workaround (seems) to have resolved the issue!
What's going on behind the scenes is that there is a threading problem within our implementation of the Visual Studio Build... Cancel command, which occurs even when the command hasn't been issued. The problem only seems to manifest itself in some virtual machine configurations, although we haven't managed to determine specifically what the issue is yet. The workaround that Sergio provided disables the command altogether, preventing the threading defect from freezing VS (while also temporarily preventing you from cancelling an in-progress build).
Once we have a proper fix, it would be great if you had a chance to try it out to confirm that it resolves the issue for you, without a sqlproj edit required.
Product Manager
Redgate Software
Unfortunately the issue is not yet resolved, so the above workaround still applies. I hope to have an update shortly, however.
Product Manager
Redgate Software
I'm pleased to announce that we now have a hotfix for ReadyRoll Pro that resolves the freezing issue:
http://download.red-gate.com/EAP/ReadyRoll/ReadyRoll_1.14.10.4627.exe
Please note that a hotfix is not yet available for ReadyRoll Core (the version of ReadyRoll that is included with VS2017 Enterprise).
If you are able to try this and let us know if this resolves the deadlock problem, that would be great.
Product Manager
Redgate Software
Product Manager
Redgate Software