如何使用Visual Studio访问活动项目的bin文件夹2010中添加活动项目、如何使用、文件夹、Visual

2023-09-06 15:22:17 作者:寂寞是你给的伤

我想用对象(_applicationObject)来访问活动项目的Bin文件夹中,我得到它后,创建外接程序项目 我的code至今:

 对象ob = _applicationObject.ActiveSolutionProjects;
 //我想这个结果
 // D:/ MYPROJECT /斌
 

解决方案

  Environment.CurrentDirectory
 

返回当前的工作目录。

也可以使用

System.Reflection.Assembly.GetExecutingAssembly()。位置

Visual Studio项目打包生成dll文件的操作教程

I want to access Bin folder of active project using object (_applicationObject) that i get it after create add-in project my code till now:

object ob = _applicationObject.ActiveSolutionProjects;
 // i want this result
 // D:/Myproject/Bin

解决方案

Environment.CurrentDirectory

returns the current working directory.

or you can use

System.Reflection.Assembly.GetExecutingAssembly().Location