Hi people!!! I had to develop an application that has to work as standalone and also as "add on" of some ERP systems. One of the things done in my program is to have an object serialized to an XML File. It works 90% of the time... but under ONE of the ERP Systems (SAP) I get a System.InvalidOperationException: "There was an error generating the XML document", InnerException is "Could not load file or assembly 'Swissdec..." What is driven me crazy is that this exception is generated inside that assembly... Does somebody have an idea??? here is the stack: Title: System.InvalidOperationException Date/Time: 19.12.2008 08:53:43 Message: There was an error generating the XML document. StackTrace: at SCS.Swissdec.XmlGenerator.GenerateXmlFileAsDeclareSalary(String pPathToGenerate) at SCS.Swissdec.SwissdecLogic.Send(DateTime pFromDate, DateTime pToDate, String pSubstituteRequestId) at SCS.SalaryGUI.Tools.SwissdecControl.btnSend_Click(Object sender, EventArgs e) ****************************** Message: Could not load file or assembly 'Swissdec, Version=10.10.108.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) StackTrace: at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDeclareSalary.Write81_DeclareSalary(Object o) ****************************** Message: String cannot have zero length. StackTrace: at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at SCS.Salary_B1AddOn.currentDomain_AssemblyResolve(Object sender, ResolveEventArgs args) at System.AppDomain.OnAssemblyResolveEvent(String assemblyFullName) ******************************
Life is not short... the problem is only how you organize yourself