How do I pass this common property to MSBuild using TeamCity?

后端 未结 4 922
半阙折子戏
半阙折子戏 2021-02-19 06:10

I am using the TeamCity Visual Studio runner. I want to add a setting that is not accessible from Visual Studio.

/Property:FileAlignment=4096

I

4条回答
  •  被撕碎了的回忆
    2021-02-19 07:10

    This was solved. To clarify, Anthony told how to solve the problem in the commandline using MSBuild. It can also be solved on the commandline using devenv, per a ticket with Microsoft, the syntax is:

     devenv ..\..\mysolution.sln /Rebuild /Property:Config=Release;Platform=AnyCPU;Filealignment=512
    

    What I wanted, however, was to get Teamcity's "Visual Studio Build" to accept the parameter. This was achieved as follows. In the box for Command line parameters, I entered:

    /Property:FileAlignment=filealignment v:diag
    

    Then the output tab for Build Parameters shows:

    User Defined Parameters
    Name                    Value passed to build
    system.filealignment    512
    system.verbosity        diagnostic
    

提交回复
热议问题