How can we help you today? How can we help you today?
SamTouray

Activity overview

Latest activity by SamTouray

We had the same issue: Export-DatabaseBuildArtifact, SQL Change Automation 4.2.20119.19650, Copyright © Red Gate Software Ltd 2014-2019 .\db\state\.git\objects\pack\pack-b5ae9c2c642d9f0554a0c735413733be13335d83.pack ##[error]Cannot generate NuGetPackage. File path: C:\Users\User1\AppData\Local\Temp\DLM Automation\ocohjn0z.s5o. Package: MyDatabase. Version: 1.0, Underlying error: Can not access a closed Stream.. In our case we are using Git for source control and our database scripts folder is in the VCS root, so it was attempting to include the .git folder in the generated NuGet package. Our .git folder was 60.8 MB! I solved it by adding a task to delete the .git folder.  I found out that it includes the .git folder by trying it on another source controlled database with a smaller .git folder and the generated NuGet package includes everything in the source folder, not just *.sql files. You can see this yourself by changing the extension of the NuGet package to .zip and opening in Windows Explorer. I am planning to move our database scripts folder to a sub-folder of the VCS root and then we won't need a task to delete the .git folder. Also, it's just a cleaner solution as we are then free to store other files/folders in our VCS root and they won't affect database package creation. / comments
We had the same issue: Export-DatabaseBuildArtifact, SQL Change Automation 4.2.20119.19650, Copyright © Red Gate Software Ltd 2014-2019 .\db\state\.git\objects\pack\pack-b5ae9c2c642d9f0554a0c735...
0 votes