getting the value of $(ProjectDir), $(SolutionDir) in a vcproj file

拟墨画扇 提交于 2019-12-01 21:40:53

问题


Is it possible to get the value of $(ProjectDir) or $(SolutionDir) programatically outside Visual Studio? My scenario is I need to read a vcproj file as a text file and get its properties like the outputdirectory etc.. problem is some properties contain environment variables like $(SolutionDir) and the like.


回答1:


Well, you found out that looking at the .vcproj file isn't enough. You need to know the .sln file as well. You're kinda stuck until you resolve this. Visual Studio will always create a .sln file when it loads a .vcproj file and cannot find a matching .sln. Maybe you want to do that too.



来源:https://stackoverflow.com/questions/4875789/getting-the-value-of-projectdir-solutiondir-in-a-vcproj-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!