I have an outlook add-in in which I need to load a custom dll using DllImport. I have included the dll in the project resources and when the project is 'published' it is copied to the Resources folder.
My problem is that after a user installs the add-in I do not know where the DLLs I have included in the resources are. If I knew then I could add that location to the current search path and everything would work.
Environment.SetEnvironmentVariable("PATH", Environment.GetEnvironmentVariable("PATH") + ";" + dllDirectory);
Does anybody have a solution or am I going about this all wrong?