Comments
5 comments
-
Hi @Lucian sorry to hear you're getting an issue with your build task with SQL Change Automation! I'm going to need some more detailed logs etc, what I'll do is reach out to you via a support ticket and we can investigate from there!
-
Thanks @... for your help. I think we managed to make it work using the previous version of the Azure DevOps Task version 3.*.
-
We have similar problem.Export-DatabaseBuildArtifact, SQL Change Automation 4.2.20119.19650, Copyright © Red Gate Software Ltd 2014-2019.\db\state\.git\objects\pack\pack-d5a74b84a2ec9b4be0ee3e4a1a7df1d3075a3379.pack##[error]Cannot generate NuGetPackage. File path: C:\Users\VssAdministrator\AppData\Local\Temp\DLM Automation\21pidr4p.pjo. Package: XXX. Version: 20.05.01.2, Underlying error: Can not access a closed Stream..
Problem exists on our 2 biggest databases (~7000 and ~14000 objects), on databases smaller than 3000 objects nuget is created successfuly.
Using task version 3.* solves above problem, but I would prefer using 4.* accross all builds. -
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. -
Hi @muscimol & @SamTouray
Just to keep you in the loop there's currently an issue in version 4.* where if a NuGet package exceeds a certain size it's causing failure, it's currently being investigated by the team with the bug reference: SCA-2717. As mentioned above by other customers discoveries, the current workaround is to use version 3.*
Hope this helps clear up the situation and we will do our best to let you know when a fix comes around!
Add comment
Please sign in to leave a comment.
Recently our builds on Azure DevOps started to fail with the following error message:
##[error]Cannot generate NuGetPackage. File path: C:\windows\ServiceProfiles\NetworkService\AppData\Local\Temp\DLM Automation\
The NuGet package (artifact) is created but it's empty (0 bytes).
Thanks in advance!
Log output on the build step: