我需要使用 c# 以编程方式获取 vcxproj 的输出文件 [英] I need to get the output file of a vcxproj programatically using c#

查看:47
本文介绍了我需要使用 c# 以编程方式获取 vcxproj 的输出文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以通过右键单击项目并查看其属性来查看属性、TargetPath、TargetDir、TargetFileName,但我需要以编程方式执行此操作.任何帮助将不胜感激.

I know that I can look into properties,TargetPath, TargetDir, TargetFileName, by right clicking on a project and checking out it's properties but I need to do this programatically. Any help would be very much appreciated.

推荐答案

您可以从以下代码开始获取此类属性(以选择的启动项目为例):

You can get such properties (using the selected startup project as an example) starting with the following code:

Project startupProject = DTE.Solution.Item(((DTE.Solution.SolutionBuild as SolutionBuild2).StartupProjects as object[])[0]);
Properties p = startupProject.ConfigurationManager.ActiveConfiguration.Properties;

这篇关于我需要使用 c# 以编程方式获取 vcxproj 的输出文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆