Azure pipeline cannot find seed data txt file to deploy on azure sql using redgate deploy automation
ldelpozo
Posts: 1 New member
I'm running a redgate deployment task on my azurepipeline (RedgateSqlChangeAutomationRelease@4) to deploy my nuget package file on azure sql database Elastic pool but I'm getting the error:
I have in my migration directory an .sql file with the:
I'm following this documentation: https://documentation.red-gate.com/sca4/developing-databases/working-with-the-visual-studio-extension/advanced-scenarios-for-visual-studio/using-seed-data-in-visual-studio
Any ideas to share are really appreciated.
Thank you
Luis
Cannot bulk load because the file "C:\Users\VssAdministrator\AppData\Local\Temp\DLM Automation\djirrmiq.kal\Seed\DataDictionary.txt" could not be opened. Operating system error code (null).
##[warning]RedGate.Versioning.Engine.Core.DatabaseInteraction.ScriptExecution.Exceptions.DeploymentException: An error occurred during script deployment. Output from SQL Server follows.
---------------------------------------------------------------
Msg 4861, Level 16, State 1, Server usndtaxidmsql01, Line 1
Cannot bulk load because the file "C:\Users\VssAdministrator\AppData\Local\Temp\DLM Automation\djirrmiq.kal\Seed\DataDictionary.txt" could not be opened. Operating system error code (null).
---------------------------------------------------------------
I have in my migration directory an .sql file with the:
BULK INSERT [Core].[DataDictionary]
FROM '$(DeployPath)Seed\DataDictionary.txt'
WITH (FIELDTERMINATOR = '|', FIRSTROW = 2);
GO
also in my project I have set:
<ItemGroup>
<Folder Include="Seed" />
</ItemGroup>
also in my project I have set:
<ItemGroup>
<Folder Include="Seed" />
</ItemGroup>
<ItemGroup>
<None Include="Seed\DataDictionary.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
During pipeline build redgate I can see the file being copied:
</ItemGroup>
During pipeline build redgate I can see the file being copied:
##[debug] Copy: Creating directory "bin\Debug\Seed".
##[debug] Copy: Copying file from "D:\a\1\s\EY.Raptor.Forms.Efile\EY.Raptor.Forms.Efile.EFileCatalogDB\Seed\DataDictionary.txt" to "bin\Debug\Seed\DataDictionary.txt".
Any ideas to share are really appreciated.
Thank you
Luis
Answers