How to “get rid of” $(SolutionDir) when building Visual Studio project from outside Visual Studio

后端 未结 3 1609
粉色の甜心
粉色の甜心 2021-02-04 00:28

I want to build a .vcxproj via MSBuild from outside Visual Studio. The problem is that there are many occurrences of $(SolutionDir) inside the .vcxproj file which apparently onl

3条回答
  •  鱼传尺愫
    2021-02-04 01:12

    You can use a relative path.

    I am not sure about Visual Studio 2010 as in the question, but it guaranteed works since Visual Studio 2012.

    If the project folder is right under the solution folder then the relative path is ..\\.

    This, by the way, can be combined with the parameter argument from Grant Thomas's answer.

    ..\
    

提交回复
热议问题