The other day I got a question: How can I deploy an app via ClickOnce using Team Build? There is not out of box way to do that, but we can do it with a simple workaround: we should overload the target AfterCompile in TFSBuild.Proj to call MSBuild Task Publish and can pass the PublishDir property: <Target Name="AfterCompile">
Condition=" '@(SolutionToBuild)'!='' "
Code analysis provides a way of making sure our assemblies don’t violate the programming and design rules set forth in the Microsoft .NET Framework Design Guidelines (including issues related to Globalization, Security, Performance, Portability, and many more). We can run code analysis from the IDE and from MSBuild. To do it, we first have to turn on Code Analysis from within the IDE. To do it we have to open the project properties, and in the Project designer, we should select the Code Analysis tab and check the Enable Code Analysis on Build checkbox. By...
A question I got today: "How can I configure my Team Build for an incremental build?".
Well, it's simple.
Team Build 2005
Add the PropertyGroup definition to the end of the TFSBuild.proj file, before the closing </project> tag.
Set the following properties: <PropertyGroup>
Team Build 2008
Set IncrementalBuild property to true. To do it, add the PropertyGroup definition to the end of the TFSBuild.proj file, before the closing </project> tag. <PropertyGroup>
Microsoft announce the public release of a new developer tool - Source Analysis for C#. Inside Microsoft this tool's name is StyleCop and it enforces code style guidelines on the code we write Source Analysis comes with a set of default rules analyzers covering approximately 200 best practice rules. These rules are full compatible with the default layout settings in Visual Studio 2005 and Visual Studio 2008. Specifically, these rules cover the following, in no particular order: Layout of elements, statements, expressions, and query clauses Placement of curly...
Next week I'll give a session at TechEd 2008 In Eilat, Israel. The session will introduce you how you can control your database changes and integrate it into your agile development methodology. Do you want to control your database changes? Do you want to test your database with unit test and even run static analysis on it? Do you want better life and easier deployment of the database schema changes to the production database? If one of your answers is YES, come and discover new world. Session Details: ...
The ability to remove entries from ItemGroups is one of the new features of MSBuild 3.5. To remove an Item from an ItemGroup in MSBuild 2.0 you would have to create a new ItemGroup from the old one and skip the Item that you needed removed. In MSBuild 3.5 we can achieve it by using the Remove parameter. Example: <ItemGroup>
<Files Include="a.cs" />
<Files Include="b.cs" />
<Files Include="c.cs" />
<Files Include="d.cs" />
<Files Include="e.cs" />
Few week ago, I've been asked by Patrick Smacchia, a C# MVP to try this tool. I really want to thanks Patrick to give me the chance to evaluate a professional edition. I installed it and start working with. After using this tool, it's my most favorite tool to reviewing my code! NDepend is an excellent tool that is designed to provide a very deep analysis of your compiled code to help you understand and control your development effort by managing both the quality and the complexity of your code. NDepend works in a very similar way...
Finally, the “DataDude” team announced the availability of the Power Tools for Visual Studio Team System 2008 Database Edition. The release includes all the functionality that shipped in 2005 plus: Command line SQL Static Code Analysis execution through MSBuild. This enables SQL Static Code Analysis to be an integrated part of Team Build! Data Generation Wizard; allow users to create a new data generation plan by pointing at an existing database, the plan will be fully configured by the wizard to pull all data from the database using the Sequential...
SetBuildProperties task is one of the new tasks that shipped in Team Build 2008. With this task we can modify properties of a BuildDetail object directly from MSBuild's TfsBuild.proj script. The SetBuildProperties task is defined in the Microsoft.TeamFoundation.Build.Tasks.VersionControl.dll. The available properties are: Property Description LabelName Specifies the label name. ...
Many users want to modify the default build number of Team System Team Build which looks like: <Build-Type-Name>_<Date>.XXX. You can change it by writing a custom task and call it in the BuildNumberOverrideTarget target of the MSBuild file. In this example the task will generate a unique build number based on current time: using System;
public class BuildNameGenerator:Task
private string _buildName;
public override bool Execute()