Need primer for a Msbuild newbie [closed]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 10:23:03

This sounds like a very easy script to write. Even a batch file would do:

msbuild \path\to\first.sln /p:Configuration=Release
msbuild \path\to\second.sln /p:Configuration=Release
msbuild \path\to\third.sln /p:Configuration=Release
msbuild \path\to\fourth.sln /p:Configuration=Release
call deploy

Of course, much better would be to have a server running, say CruiseControl.NET, that gives a web interface into the build status and history.

In MS Build, there are two main control points for the caller: The Target and its Properties. The Target is what to compile, resources, compilation, deployment, etc. The Properties control how that Target is built.

You can control the configuration using the Configuration property (see above). If you open your *.*proj files, you will notice PropertyGroup elements. These are settable via the commandline using the /p arg.

Here are the specs for the two args:

/target:<targets>  Build these targets in this project. Use a semicolon or a
                 comma to separate multiple targets, or specify each
                 target separately. (Short form: /t)
                 Example:
                   /target:Resources;Compile

/property:<n>=<v>  Set or override these project-level properties. <n> is
                 the property name, and <v> is the property value. Use a
                 semicolon or a comma to separate multiple properties, or
                 specify each property separately. (Short form: /p)
                 Example:
                   /property:WarningLevel=2;OutDir=bin\Debug\

Here's a good guide that has a lot of great information on MSBuild, Continuous Integration and CuriseControl.NET. Definitely a good place to start.

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