I am using SMO within c#.NET to build a SMO transfer object and then execute it to transfer data between various SQL instances...Think Import/Export wizard with some error handling ;)
If i run in debug mode the application runs fine. As soon as I publish and run it on the same machine, same user I get the following error as soon as the transfer is attempted
The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs
when CPackage::LoadFromXML fails.
Having watched the package it's ouput in DEBUG mode I can see it creating temporary xml files (TransferMetadata491574513.xml) with the various SQL scripts and a temporary DTSX file in "C:\Documents and Settings\MYUSER\Local Settings\Application Data\Microsoft\SQL
Server\Smo" , these do not get created using the published version.
If i run the exe in the DEBUG or RELEASE folder it also works fine. The only issue is when i Publish the application.
I have checked the two MSDN articles http://support.microsoft.com/?id=918038 and http:
View Complete Post