How do I get Bin Path?

后端 未结 6 1430
时光取名叫无心
时光取名叫无心 2020-12-25 09:32

I need to the the bin path of the executing assembly. How do you get it? I have a folder Plugins in the Bin/Debug and I need to get the location

6条回答
  •  粉色の甜心
    2020-12-25 10:06

    var path = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)?.Replace("file:\\", "");
    

提交回复
热议问题