System.OutOfMemoryException when trying to build sql project.

WoehrMiWoehrMi Posts: 5 Bronze 1
edited September 24, 2019 1:39PM in SQL Change Automation
After updating from Visual Studio 2019 Version 16.2.5 to 16.3.0 I am no longer able to build my main sql project using the "Visual Studio SQL Change Automation Extension". In the Visual Studio Error list I get the following error message: "Severity Code Description Project File Line Suppression State
Error An error occurred while attempting to generate a package deployment script: Exception of type 'System.OutOfMemoryException' was thrown. .. ". I also tested this for smaller projects (~10 Migration scipt files) => Building worked in this case but the output "*_Package.sql" file has a file size of ~30MB. The original size of the "*_Package.sql" file was ~500KB. Current SQL Change Automation version:  4.0.19261.10679
Tagged:

Comments

  • Luke_MLuke_M Posts: 1 New member
    This is happening to me too for all of our projects, I updated to the latest on Visual Studio and SQL Change Automation and am suddenly getting this.
  • Fugazzi8Fugazzi8 Posts: 5 New member
    Same issue here. Using visual studio 2019 16.3 which just shipped yesterday
  • Same issue here.  I receive the error in VS2019 (16.3.0), but everything works as expected in VS2017 (15.9.16).

    Both Visual Studio instances show that I am using Redgate SQL Change Automation (4.0.19261.10679).
  • Fugazzi8Fugazzi8 Posts: 5 New member
    I have a ticket in and haven't heard back. This needs to be addressed asap!
  • The development team is looking into this with priority. Apologies for the inconvenience
  • We are investigating how to fix this. As a workaround, open the sqlproj file in the file editor find the flag <GenerateSqlPackage> and set it to False. This will prevent package scripts being generated but it will fix the out of memory issue, while we continue work on this.

  • Fugazzi8Fugazzi8 Posts: 5 New member
    That flag did not exist in my sqlproj file, but I added it and it still throws the error. 
  • I had the setting, changed it and I'm still receiving the out of memory exception

  • This morning I have updated the VisualStudio-Extension to Version 4.0.19270.10947. The build process now completes without the OutOfMemoryException, but the size of the package files are completely unacceptable! What's the reason for this? Building my main sqlproj-Migration outputs now a package file with a size of  ~300MB. Building it before -with the same content(!!!)- generated a package file of 2-3MB. I have to support customers via slow VPN connection. Another problem I experienced after update to 4.0.19270.10947: I cannot open old migration scripts from the Visual Studio Solution explorer or from the VS error list. A double click on the item raises now an error msg dialog from Visual Studio: "Failed to create an editor. Value cannot be null. Parameter name: password".
  • WoehrMi said:
    Another problem I experienced after update to 4.0.19270.10947: I cannot open old migration scripts from the Visual Studio Solution explorer or from the VS error list. A double click on the item raises now an error msg dialog from Visual Studio: "Failed to create an editor. Value cannot be null. Parameter name: password".
    Please could you try opening the database connection window in Visual Studio and testing the database connection. I hope this will fix this issue.

    We will look further into the issue you are facing with very large package files. If you are able to open a support ticket here we can look into your specific case. Thanks.
  • Yes, this fixed the issue "Failed to create an editor..". Thank you!
  • JeffQcJeffQc Posts: 1 New member
    Seem to be fixed in the 4.0.19275.11055 version availlable in the extentions manager this morning
  • WoehrMi said:
    Another problem I experienced after update to 4.0.19270.10947: I cannot open old migration scripts from the Visual Studio Solution explorer or from the VS error list. A double click on the item raises now an error msg dialog from Visual Studio: "Failed to create an editor. Value cannot be null. Parameter name: password".
    Please could you try opening the database connection window in Visual Studio and testing the database connection. I hope this will fix this issue.

    We will look further into the issue you are facing with very large package files. If you are able to open a support ticket here we can look into your specific case. Thanks.
  • WoehrMi said:
    Another problem I experienced after update to 4.0.19270.10947: I cannot open old migration scripts from the Visual Studio Solution explorer or from the VS error list. A double click on the item raises now an error msg dialog from Visual Studio: "Failed to create an editor. Value cannot be null. Parameter name: password".
    Please could you try opening the database connection window in Visual Studio and testing the database connection. I hope this will fix this issue.

    We will look further into the issue you are facing with very large package files. If you are able to open a support ticket here we can look into your specific case. Thanks.
  • CHardyCHardy Posts: 1 New member
    When I attempt to build my Project I recieve the Error:
    Error An error occurred while attempting to generate a package deployment script: Exception of type 'System.OutOfMemoryException' was thrown.

    I have noticed that in my Build it is doing the following:
    Using SQL Change Automation toolpath: E:\Development\LeisureHub\Main\LeisureHub\packages\ReadyRoll.MSBuild.3.0.18249.1181\tools\SqlChangeAutomation.Data.Schema.Ssdt.targets
    Using SQL Change Automation version: 3.0.18249.1181

    I have Upgraded to the latest version of the SQL Change Automation 4.0.19275.11055 and still receive this even after testing the database conneciton..
     
    How can I resolve this?
  • WoehrMiWoehrMi Posts: 5 Bronze 1
    Version 4.0.19275.11055 fixed the issue for me. The OutOfMemoryException is gone, the size of the package files went back to normal and the file content is now as expected.
Sign In or Register to comment.