简体   繁体   English

如何在外接代码中扩展Visual Studio变量?

[英]How to expand Visual Studio variables in the add-in code?

I'm working on a VS add-in. 我正在开发VS加载项。 How do I expand variables like $(ProjectDir) ? 如何扩展$(ProjectDir)类的变量?

I think you want something similar to what an answer to a related question on SO describes. 我认为您想要类似于SO相关问题的答案所描述的内容。

The linked answer speaks to VC++ projects and VCProject etcetera; 链接的答案针对VC ++项目和VCProject等。 but a quick search yielded the VSProject interface , which seems to provide a starting point for something similar with C#/VB.NET projects. 但是快速搜索就产生了VSProject接口 ,它似乎为C#/ VB.NET项目的相似之处提供了起点。

Specifically check out the VSProject.Project property and the Project.ConfigurationManager property to which the VSProject interface page directly and indirectly links. 具体检查出VSProject接口页面直接和间接链接到的VSProject.Project属性Project.ConfigurationManager属性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM