SOLVED

MSIX-package with using VC++ runtime redistributable (14.21.27702)

%3CLINGO-SUB%20id%3D%22lingo-sub-1227412%22%20slang%3D%22en-US%22%3EMSIX-package%20with%20using%20VC%2B%2B%20runtime%20redistributable%20(14.21.27702)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1227412%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20the%20following%20situation%3A%3C%2FP%3E%3CP%3EI%20have%20WinForms-application%20(used%20.NET%20Framework%204.7.2)%20which%20is%20starting%20Visio%20and%20loading%20a%20Visio%20Add-on%20(a%20VSL)%20which%20is%20using%20the%20VC%2B%2B%20runtime%20redistributable%20(%3CFONT%3E14.21.27702%3C%2FFONT%3E).%20Visio%20and%20the%20VC%2B%2B%20runtime%20redistributables%20are%20installed%20locally%20on%20the%20Windows%2010%20system.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20WinForms-application%20is%20which%20is%20installed%20via%20a%20msix-package%20(made%20with%20InstallShield%202019R3%3B%20this%20msix%20is%20used%20in%20a%20sideloading%20scenario)%20is%20starting%20correctly.%20However%20when%20I%20start%20Visio%20from%20the%20WinForms-application%20Visio%20is%20started%2C%20but%20the%20Visio%20Add-on%20(VSL)%20is%20loading%20the%20following%20exception%20occurs%3A%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CFONT%3ESystem.Runtime.InteropServices.COMException%20(0x86DB08A9)%3A%20%3C%2FFONT%3E%3CFONT%3EInvalid%20parameter.%3C%2FFONT%3E%3C%2FDIV%3E%3CDIV%3E%3CFONT%3E%26nbsp%3B%26nbsp%3B%20at%20Microsoft.Office.Interop.Visio.AddonsClass.get_Item(Object%20NameOrIndex)%3C%2FFONT%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20also%20made%20an%20AppV-package%20of%20the%20same%20WinForms-application%20and%20I%20start%20Visio%26nbsp%3B%3CSPAN%3Efrom%20the%20WinForms-application%3C%2FSPAN%3E%20and%20loading%20the%20Visio%20Add-on%20everything%20is%20going%20fine.%20The%20AppV-package%20is%20installed%20on%20the%20same%20machine%20as%20the%20Msix-package.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20had%20the%20same%20issue%20with%20the%20AppV-package%20when%20the%20VC%2B%2B%20redistributable%20(%3CFONT%3E14.21.27702%3C%2FFONT%3E)%20was%20not%20installed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20have%20suggestions%20for%20what%20I%20could%20do%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20Regards%2C%3C%2FP%3E%3CP%3EThierry%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1248130%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX-package%20with%20using%20VC%2B%2B%20runtime%20redistributable%20(14.21.27702)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1248130%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F579489%22%20target%3D%22_blank%22%3E%40Thierry1967%3C%2FA%3E%2C%20how%20are%20you%20launching%20Visio%20and%20the%20addon%3F%20Are%20either%20Visio%20or%20the%20addon%20packaged%20as%20an%20MSIX%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1248847%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX-package%20with%20using%20VC%2B%2B%20runtime%20redistributable%20(14.21.27702)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1248847%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F144649%22%20target%3D%22_blank%22%3E%40Dian%20Hartono%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20response.%3C%2FP%3E%3CP%3EVisio%20is%20launched%20via%20the%20Microsoft%20Office%20Visio%20Interop.%20Example%20code%20(C%23)%3A%3C%2FP%3E%3CP%3E%3CEM%3E%3CFONT%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20VisioInterop.Application%20application%20%3D%20new%20VisioInterop.Application()%3B%3C%2FFONT%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3EThe%20Visio%20addon%20is%20loaded%20also%20via%26nbsp%3B%3CSPAN%3Ethe%20Microsoft%20Office%20Visio%20Interop.%20Example%20code%20(C%23)%3A%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%3E%3CEM%3E%3CFONT%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20protected%20override%20VisioInterop.Addon%20LoadMavimVslAddon()%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Microsoft.Office.Interop.Visio.Addon%20vslAddon%20%3D%20null%3B%3C%2FFONT%3E%3C%2FEM%3E%3C%2FDIV%3E%3CDIV%3E%3CEM%3E%3CFONT%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20try%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F%2F%20Return%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20short%20eventsEnabled%20%3D%20this._application.EventsEnabled%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20bool%20showFileOpenWarnings%20%3D%20this._application.Settings.ShowFileOpenWarnings%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20bool%20showFileSaveWarnings%20%3D%20this._application.Settings.ShowFileSaveWarnings%3B%3C%2FFONT%3E%3C%2FEM%3E%3C%2FDIV%3E%3CDIV%3E%3CEM%3E%3CFONT%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20this._application.EventsEnabled%20%3D%20(short)0%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20this._application.Settings.ShowFileOpenWarnings%20%3D%20false%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20this._application.Settings.ShowFileSaveWarnings%20%3D%20false%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20vslAddon%20%3D%20this._application.LoadAddon(VslFilePath%2C%20%22MavimVsl%22)%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20this._application.Settings.ShowFileOpenWarnings%20%3D%20showFileOpenWarnings%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20this._application.Settings.ShowFileSaveWarnings%20%3D%20showFileSaveWarnings%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20this._application.EventsEnabled%20%3D%20eventsEnabled%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20catch%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20throw%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FFONT%3E%3C%2FEM%3E%3C%2FDIV%3E%3CDIV%3E%3CEM%3E%3CFONT%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20vslAddon%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FEM%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CEM%3E%3CFONT%3Einternal%20static%20class%20VisioExtensions%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20internal%20static%20Microsoft.Office.Interop.Visio.Addon%20LoadAddon(this%20Microsoft.Office.Interop.Visio.Application%20application%2C%20string%20addonFileName%2C%20string%20addonName)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20if%20(!System.IO.File.Exists(addonFileName))%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20throw%20new%20System.IO.FileNotFoundException()%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FFONT%3E%3C%2FEM%3E%3C%2FDIV%3E%3CDIV%3E%3CEM%3E%3CFONT%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20application.Addons.Add(addonFileName)%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Microsoft.Office.Interop.Visio.Addon%20addon%20%3D%20application.Addons%5BaddonName%5D%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20return%20addon%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FFONT%3E%3C%2FEM%3E%3C%2FDIV%3E%3CDIV%3E%3CEM%3E%3CFONT%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FFONT%3E%3C%2FEM%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3E%3CFONT%3ELoadAddon%3C%2FFONT%3E%3C%2FEM%3E%26nbsp%3Bis%20an%20extension%20method%20on%20the%20Visio%20application.%3C%2FP%3E%3CP%3EThe%26nbsp%3B%3CEM%3E%3CFONT%3EVslFilePath%3C%2FFONT%3E%3C%2FEM%3E%20refers%20to%20the%20path%20where%20the%20addon%20is%20located%20and%20the%20addon%20is%20part%20of%20the%20msix-package.%20So%20the%20WinForms-application%20including%20the%20addon%20are%20packaged%20as%20a%20msix-package.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EVisio%20is%20installed%20locally%20on%20the%20machine%20(and%20is%20not%20packaged).%20I%20noticed%20that%20Visio%20is%20started%20from%20the%20WinForms%20application.%20However%2C%20when%20loading%20the%20Visio%20addon%20an%20exception%20occurs.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20you%20have%20an%20idea%20what%20is%20happening.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards%2C%3C%2FP%3E%3CP%3EThierry%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1392118%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX-package%20with%20using%20VC%2B%2B%20runtime%20redistributable%20(14.21.27702)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1392118%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F144649%22%20target%3D%22_blank%22%3E%40Dian%20Hartono%3C%2FA%3E%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20news%20on%20this%20issue%20or%20is%20this%20architecture%20too%20complex%20for%20the%20MSIX-technology%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20.NET%20Framework%20Winforms%20Application%20which%20is%20launching%20Visio%20and%20subsequently%20loading%20a%20Visio%20Addon%20(VSL)%20which%20uses%20the%20VC%2B%2B%20runtime%20redistrutable.%20Furthermore%20are%20the%20.NET%20Framework%20Winforms%20Application%20and%26nbsp%3B%3CSPAN%3EVisio%20Addon%20(VSL)%3C%2FSPAN%3E%20communicating%20with%20each%20other%20via%20the%20WCF%20technology.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20I%20have%20to%20include%20Visio%20as%20wel%20in%20the%20MSIX-package%20in%20some%20way%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20earlier%20mentioned%20with%20an%20AppV-package%20this%20is%20all%20working...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThierry%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1405021%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX-package%20with%20using%20VC%2B%2B%20runtime%20redistributable%20(14.21.27702)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1405021%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F579489%22%20target%3D%22_blank%22%3E%40Thierry1967%3C%2FA%3E%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20look's%20that%20there%20has%20been%20reported%20related%20issue%20with%20the%20same%20exception%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fmsix-deployment%2Fmsix-packaging-of-office-applications-visio-project-proplus%2Fm-p%2F1058109%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fmsix-deployment%2Fmsix-packaging-of-office-applications-visio-project-proplus%2Fm-p%2F1058109%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%3CSPAN%3EOffice%20is%20working%20with%20Windows%20to%20integrate%20MSIX%20In%20a%20future%20release%2C%20according%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I have the following situation:

I have WinForms-application (used .NET Framework 4.7.2) which is starting Visio and loading a Visio Add-on (a VSL) which is using the VC++ runtime redistributable (14.21.27702). Visio and the VC++ runtime redistributables are installed locally on the Windows 10 system.

 

The WinForms-application is which is installed via a msix-package (made with InstallShield 2019R3; this msix is used in a sideloading scenario) is starting correctly. However when I start Visio from the WinForms-application Visio is started, but the Visio Add-on (VSL) is loading the following exception occurs:

 
System.Runtime.InteropServices.COMException (0x86DB08A9): Invalid parameter.
   at Microsoft.Office.Interop.Visio.AddonsClass.get_Item(Object NameOrIndex)

 

I have also made an AppV-package of the same WinForms-application and I start Visio from the WinForms-application and loading the Visio Add-on everything is going fine. The AppV-package is installed on the same machine as the Msix-package.

 

I have had the same issue with the AppV-package when the VC++ redistributable (14.21.27702) was not installed.

 

Does anyone have suggestions for what I could do?

 

Kind Regards,

Thierry

4 Replies

Hi @Thierry1967, how are you launching Visio and the addon? Are either Visio or the addon packaged as an MSIX? 

Hi @Dian Hartono,

 

Thank you for your response.

Visio is launched via the Microsoft Office Visio Interop. Example code (C#):

         VisioInterop.Application application = new VisioInterop.Application();

The Visio addon is loaded also via the Microsoft Office Visio Interop. Example code (C#):

        protected override VisioInterop.Addon LoadMavimVslAddon()
        {
            Microsoft.Office.Interop.Visio.Addon vslAddon = null;
            try
            {
                // Return
                short eventsEnabled = this._application.EventsEnabled;
                bool showFileOpenWarnings = this._application.Settings.ShowFileOpenWarnings;
                bool showFileSaveWarnings = this._application.Settings.ShowFileSaveWarnings;
                this._application.EventsEnabled = (short)0;
                this._application.Settings.ShowFileOpenWarnings = false;
                this._application.Settings.ShowFileSaveWarnings = false;
                vslAddon = this._application.LoadAddon(VslFilePath, "MavimVsl");
                this._application.Settings.ShowFileOpenWarnings = showFileOpenWarnings;
                this._application.Settings.ShowFileSaveWarnings = showFileSaveWarnings;
                this._application.EventsEnabled = eventsEnabled;
            }
            catch
            {
                throw;
            }
            return vslAddon;
        }

 

internal static class VisioExtensions
    {
        internal static Microsoft.Office.Interop.Visio.Addon LoadAddon(this Microsoft.Office.Interop.Visio.Application application, string addonFileName, string addonName)
        {
            if (!System.IO.File.Exists(addonFileName))
            {
                throw new System.IO.FileNotFoundException();
            }
            application.Addons.Add(addonFileName);
            Microsoft.Office.Interop.Visio.Addon addon = application.Addons[addonName];
            return addon;
        }
    }

 

LoadAddon is an extension method on the Visio application.

The VslFilePath refers to the path where the addon is located and the addon is part of the msix-package. So the WinForms-application including the addon are packaged as a msix-package.

 

Visio is installed locally on the machine (and is not packaged). I noticed that Visio is started from the WinForms application. However, when loading the Visio addon an exception occurs.

 

I hope you have an idea what is happening.

 

Kind regards,

Thierry

 

Hi @Dian Hartono :

 

Any news on this issue or is this architecture too complex for the MSIX-technology ?

 

A .NET Framework Winforms Application which is launching Visio and subsequently loading a Visio Addon (VSL) which uses the VC++ runtime redistrutable. Furthermore are the .NET Framework Winforms Application and Visio Addon (VSL) communicating with each other via the WCF technology. 

 

Do I have to include Visio as wel in the MSIX-package in some way?

 

As earlier mentioned with an AppV-package this is all working...

 

Kind regards,

 

Thierry 

Best Response confirmed by Sharla Akers (Microsoft)
Solution

@Thierry1967:

 

It look's that there has been reported related issue with the same exception:

 

https://techcommunity.microsoft.com/t5/msix-deployment/msix-packaging-of-office-applications-visio-p...

 

Office is working with Windows to integrate MSIX In a future release, according