这周我有一个兴趣msbuild。我清理了很多极其复杂的构建脚本。挖掘惊喜我能做多少钱- msbuild。net编程是一种隐藏的特性。
所以公约的问题必须有答案,在几天或一个星期,我马克最酷最有用的或隐藏的特性(s)接受。
let bestAnswer suprise slick useful = (surprise + slick + 2*useful)
有用的定义:我更新现有的msbuild脚本:包(zip文件)网站和公用事业,CC.NET集成,启动测试(UT +硒),建立数据库。我添加(新目标,更有用的):部署VMWare虚拟服务器,连接构建(立即快速构建,队列缓慢的测试)。如果你是指外部库(如< a href = " http://msbuildtasks.tigris.org/ " rel = " nofollow noreferrer " > < / >社区MSBuild任务),这将是很高兴知道如何得到它。
< >强一些我已经发现msbuild惊喜。< / >强
- Hello world using the Message task and Properties.
- Using msbuild as an installer for an extremely complex server product. MSB community tasks managed IIS server setup. The WriteLinesToFile and XmlUpdate tasks wrote server specific configuration files. If you ve work with MSI, you ll know that anything is better than MSI for installation.
- For newbies: CSProj and Vbproj files are the same as msbuild "proj" files. To edit directly: Unload your csproj or vbproj, then right click project and select edit. This is nicer and more powerful than working with clunky pre-build / post-build events.
- MSBuild comes with the generic .NET installation. Unlike other fancy tools, you can use it on a totally clean server / desktop.
Here is msbuild Hello World After I wrote it, I found the MSDN hello world.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build;Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Who>World</Who>
</PropertyGroup>
<Target Name="Hello">
<Message Text="Hello, $(Who)" Importance="high" ></Message>
</Target>
<Target Name="Build" DependsOnTargets="Hello"/>
<Target Name="Test"/>
</Project>