Mattersphere Developers Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Outlook Add in - vsto integration with mattersphere Empty Outlook Add in - vsto integration with mattersphere

Tue 4 Feb 2020 - 8:33
Hi - has anyone written a vsto before that integrates with mattersphere?I have a c# vsto which references fwbs e DLLs. Eg OMS.library. on a stand alone MS setup on
a server, the outlook addin correctly finds the fwbs dlls without having to distribute the assemblies. On a citrix setup this doesn't seem to be the case and they
cannot be found.Currently this code to access the fwbs library is in the vsto code, but I was thinking of creating a MS distributed assembly and somehow calling this via
the add-in.Does anyone have any knowledge of the best way to accomplish this.Eg some sort of run command?Many Thanks

avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Outlook Add in - vsto integration with mattersphere Empty Re: Outlook Add in - vsto integration with mattersphere

Tue 4 Feb 2020 - 8:34
Do you get an Assembly missing exception?
If so you could try implementing the AssemblyResolve event in your code. This basically allows you to specify other locations to look for the missing assemblies, we
use this on all our FWBS assemblies as more often than not they don't find the assemblies usually because the cache doesn't have them for some reason.
Set up the event handler as below
AppDomain.CurrentDomain.AssemblyResolve += MyResolveEventHandler;
Implementation of the code is something like this. Our code also copies the required dll from a central location to the local citrix server too, if it isn't already there.
public System.Reflection.Assembly MyResolveEventHandler(object sender, ResolveEventArgs args)
{
string tempDlls = null;
tempDlls = new Grindeys.Standards.Methods().TemporaryFiles;
if (System.IO.Directory.Exists(tempDlls) == false)
{
System.IO.Directory.CreateDirectory(tempDlls);
}
string assemblyName = ““;
System.Reflection.Assembly missingAssembly = null;
string[] dllFolders = new string[] {
tempDlls,
“M:\\Custom dlls\\4.7.0.20\\”,
“M:\\Custom dlls\\General\\”,
“C:\\Program Files (x86)\\FWBS\\OMS Matter Centre\\”
};
if (args.Name.Contains(“,”))

{
assemblyName = args.Name.Substring(0, args.Name.IndexOf(“,”)) + “.dll”;
}
else
{
assemblyName = args.Name + “.dll”;
}
foreach (string folder in dllFolders)
{
string strAssemblyPath = null;
strAssemblyPath = folder + assemblyName;
if (System.IO.File.Exists(strAssemblyPath))
{
//exists
if (strAssemblyPath.ToLower().StartsWith(“c:\\”) == false)
{
System.IO.File.Copy(strAssemblyPath, tempDlls + assemblyName);
strAssemblyPath = tempDlls + assemblyName;
}
missingAssembly = System.Reflection.Assembly.LoadFrom(strAssemblyPath);
break;
}
}
return missingAssembly;
}


Back to top
Permissions in this forum:
You cannot reply to topics in this forum