DCSIMG
MSBuild - Maor's Blog

Browse by Tags

Team Build and ClickOnce
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" > < MSBuild Condition =" '@(SolutionToBuild)'!='' " Projects ="@(SolutionToBuild)" Properties ="Configuration=%(ConfigurationToBuild...
Suppress Code Analysis Warnings In Code
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...
Configure Team Foundation Build for an Incremental Build
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 > < SkipClean > true </ SkipClean > < SkipInitializeWorkspace > true </ SkipInitializeWorkspace > < ForceGet > false </ ForceGet > </ PropertyGroup > Team Build...
Microsoft Source Analysis for C#
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...
ALM 403: Control Your Database Lifecycle With Data Dude - Agenda
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...
Remove Items From ItemGroups In MSBuild
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" ...
NDepend - Great Static Analyzer
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...
Visual Studio Team System 2008 Database Edition Power Tools
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...
TeamBuild 2008 - SetBuildProperties Task
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. DropLocation Specifies the drop location. (shared folder to which the build account has read/write privileges) Quality...
Custom Build Number In Team Build
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; using Microsoft.Build.Utilities; using Microsoft.Build.Framework; namespace MaorDavidBlog.Samples.MSBuild { public class BuildNameGenerator:Task { private...
Copy WildCards With MSBuild
I got today hysterical message from a good friend that implementing in his company automatic build with Team System. The message was: "Maor, How can I copy wildcards With MSBuild? Please help!!!". Okay. What you should do my dear friend is: 1. Create an item list if you have more than one file to copy. You can do it with the CreateItem task: < CreateItem Include ="$(MyDir)\*.*" > < Output TaskParameter ="Include" ItemName ="MyFilesToCopy" /> <...
Automatically Compare Data and Schema Using MSBuild and Data Dude
VSTS for DB Professionals (aka "Data Dude" or "VSDBPro") provides great tools for schema and data compare. Like most Visual Studio-based project systems, the core tasks inside the VSDBPro project implemented as MSBuild tasks. The two core activities for Database Projects (.dbproj), “Build” and “Deploy” are implemented by two MSBuild tasks named “SqlBuildTask” and “SqlDeployTask.” Sometimes, we also need to automate the schema and...
How To: Build Non-MSBuild Projects with MSBuild
Building non-MSBuild projects is possible. For example you have to build VS2003, Installer, C++, Delphi projects etc. How can you do it? It's simple. The MSBuild has a built-in task: Exec task. This task calls cmd.exe instead of directly invoking a process and runs the specified program or command with the specified arguments. You can use it in order to build non-MSBuild projects. For example (thanks to Nagaraju ) , in order to build a Visual Studio 2003 Project you should modify the MSBuild...
Most Wanted: Debugging For MSBuild
I posted few weeks ago about the feature poll of MSBuild team on the MSBuild blog . Here are the results that indicate that a debugger for MSBuild projects is the #1 vNext request. Partho posted about a debugger he's created. It's on CodePlex too, which means you can help improve it. It runs as a logger, taking advantage of the rich event information that loggers receive, and the fact that loggers currently run synchronously with the build. v1 Feature Set: Load project and arbitrary target...
How would you spend $100 on MSBuild?
Dan Moseley, a developer on the MSBuild team , wants to know how you would prioritize features for the next version of MSBuild by asking, How would you spend $100 on MSBuild? This is a great opportunity to influence the future of MSBuild, so be sure to post your opinion. My choice: Visualization - $30 Msbuild debugger - $25 Vc support - $20 Extensible functions - $5 Inline tasks - $20 Technorati Tags: MSBuild
More Posts Next page »

Search

Go

This Blog

News

    RSS

     

    Connect with Me

    Maor's Facebook profile  Follow Maor on Twitter  Maor's profile on Linkedin  Maor in FriendFeed 
           

Syndication