I'd like to ship my program only with an executable, so I'm using Costura.Fody to embed resources in my assembly. But theres a problem.. I'm programmatically adding some assemblies (which also would be embedded) (b.e MyDll.dll
) to the GAC:
using System.EnterpriseServices.Internal;
Publish publish = new Publish();
publish.GacInstall("C:\Temp\MyDll.dll"); //path to my dll
It would work normally if I would ship the dll's separately with the exe but is there a way I can obtain a path from my executing program of MyDll.dll
assembly which is embedded in the executable and save it like that to the GAC?