Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道我可以通过右键单击一个项目并检查它的属性来查看属性、TargetPath、TargetDir、TargetFileName,但我需要以编程方式执行此操作。任何帮助将不胜感激。
您可以从以下代码开始获取此类属性(以选定的启动项目为例):
Project startupProject = DTE.Solution.Item(((DTE.Solution.SolutionBuild as SolutionBuild2).StartupProjects as object[])[0]); Properties p = startupProject.ConfigurationManager.ActiveConfiguration.Properties;