如何将环境变量添加到VS解决方案(.sln) [英] How to add environmental variable to VS solution (.sln )
本文介绍了如何将环境变量添加到VS解决方案(.sln)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要为解决方案中的所有项目设置自己的环境变量(如$(VsInstallDir))。我如何在我的解决方案中定义它?
I need to have my own environmental variable (like $(VsInstallDir) ) for all projects in solution. How can i define it in my solution ?
我正在使用VS2008,C ++解决方案
I'm using VS2008, C++ solution
推荐答案
类似的问题和后果问题一>。看看那里的答案。简短的答案是:使用属性表。
I had a similar problem and consequent question. Take a look at the answers there. The short answer is: use property sheets.
例如:
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="MyIncludes"
>
<UserMacro
Name="BoostInclude"
Value="C:\Program Files\boost\boost_1_35_0"
PerformEnvironmentSet="true"
/>
</VisualStudioPropertySheet>
这篇关于如何将环境变量添加到VS解决方案(.sln)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文