如何在outlook 2010(C#)的插件中获取程序集的路径? [英] How do I get the path of the assembly the code in an addin for outlook 2010 (C#)?
本文介绍了如何在outlook 2010(C#)的插件中获取程序集的路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在outlook 2010的加载项中使用代码(.exe)获取程序集的路径(在c#中)。
我使用:
I need to get the path of the assembly the code (.exe) in an add-in for outlook 2010 (in c#).
I use :
Assembly.GetExecutingAssembly().Location
但它返回程序集(.dll)
我需要将它写入xml文件。
请帮帮我。
but it returns the assembly (.dll)
I need to get it to write to an xml file.
Can you help me please.
推荐答案
static string getDirectoryPath()
{
string path = System.Reflection.Assembly.GetExecutingAssembly().Location;
string folderpath = System.IO.Path.GetDirectoryName(path);
return folderpath;
}
这篇关于如何在outlook 2010(C#)的插件中获取程序集的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文