Forum Discussion
Thierry1967
Mar 13, 2020Copper Contributor
MSIX-package with using VC++ runtime redistributable (14.21.27702)
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...
- May 20, 2020
It look's that there has been reported related issue with the same exception:
Office is working with Windows to integrate MSIX In a future release, according
Thierry1967
Mar 24, 2020Copper Contributor
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;
{
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;
{
// 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;
}
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();
}
{
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;
}
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
Thierry1967
May 15, 2020Copper Contributor
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
- Thierry1967May 20, 2020Copper Contributor
It look's that there has been reported related issue with the same exception:
Office is working with Windows to integrate MSIX In a future release, according