cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Christopher_Pai
Level 16

Automation Error

I'm really stumped. I have some C# build automation that dynamically adds SQL files to a Basic MSI project. I use this same build automation step and Basic MSI project to build 10 different MSI's. Prior to calling this task, I have another task that opens the project, sets the ProductCode and saves/closes it.

For one ( and only one ) of my builds, I get an error when trying to insert an SQL script. I get another error when I try to save the project. I've checked everything I can think of to check but I'm really stumped.

Anyone have any thoughts?

DynamicSQLScripts: Failed to Insert [path_to_sql_file]
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at ISWiAuto15.ISWiSQLConnectionClass.InsertSQLScript(String strScriptPath)
at MGAM.BuildAutomation.Tasks.DynamicSQLScripts.AssociateSQLScripts()

System.Runtime.InteropServices.COMException (0x800A0450): Unable to save file: [path_to_ism] : The project is open in read-only mode or is being used by another process.
at ISWiAuto15.ISWiProjectClass.SaveProject()
at MGAM.BuildAutomation.Tasks.DynamicSQLScripts.AssociateSQLScripts()
at MGAM.BuildAutomation.Tasks.DynamicSQLScripts.Execute()
Labels (1)
0 Kudos
(1) Reply
Christopher_Pai
Level 16

Nevermind, it was my fault. I had the Close() method in the wrong place and was closing it prematurely.
0 Kudos