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

  • Sergio RSergio R Posts: 610 Rose Gold 5
    Hi,

    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,
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
  • Sergio,

    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.
  • Hi,

    Are you using a Virtual Machine?

    Thank you,
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
  • Yes, the team does its development on Virtual Machines; Hyper-V if that helps.
  • Hi,

    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,
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
  • Sergio,

    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.
  • Hi,

    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.
    Daniel Nolan
    Product Manager
    Redgate Software
  • Sure. The team just updated to v 1.14.11.4593 and are reporting that the issue seems to be resolved. Was that the version with the fix you mentioned?
  • Hi,

    Unfortunately the issue is not yet resolved, so the above workaround still applies. I hope to have an update shortly, however.
    Daniel Nolan
    Product Manager
    Redgate Software
  • Hi,

    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.
    Daniel Nolan
    Product Manager
    Redgate Software
  • dnlnlndnlnln Posts: 234 Gold 2
    edited September 5, 2017 11:29PM
    Thank you for your patience. The fix has now been released as part of ReadyRoll 1.14.14 (both ReadyRoll Core & Pro)
    Daniel Nolan
    Product Manager
    Redgate Software
Sign In or Register to comment.