Archive for the Category msbuild

 
 

MSBuild Sidekick v2(beta) is available for download

MSBuild Sidekick can be used to open and build the following project types:

  • Custom build scripts
  • VS2005 C# or VB.NET projects
  • VS2005 solutions
  • Delphi projects

This version does not support building VS2008 projects and MSBuild 3.5 scripts, but  according to this post it will be provided in the future.

Features

  • View project structure in categorized project tree view (similar to v1)

  • View project structure in sequential project tree view (elements appear in the same order as in build project)

  • Show or hide imported elements in project tree view as desired

  • Add new or delete selected elements

  • Edit selected element’s properties and comments using properties grid

  • Edit elements properties in a list (for container elements such as PropertyGroup etc.)

  • Edit selected element’s properties and comments using raw XML view

  • Add tasks to targets using categorized "Add task" dialog

  • Use properties, items and item metadata intellisense support when editing elements

  • Change elements order in sequential project tree view or in elements list (for container elements)

  • Perform "intelligent" rename of the elements throughout the project (all relevant elements are renamed)

  • Delete elements throughout the project (no "dead" references left behind)

  • Navigate between elements and element views (properties, list or raw XML) using backward/forward navigation

  • Navigate between elements using "Find Element" dialog

  • Navigate between elements using "Jump To" function in element properties

  • Use integrated MSDN help (either from locally installed MSDN collection or from online MSDN)

  • View targets and tasks execution graph

  • Specify global or project-specific properties to be used in build session

  • Modify environment properties per project for the build session

  • Select targets for the build session

  • Build project

  • Review build results using console log (similar to command-line MSBuild console log)

  • Review build results using errors/warnings log

  • Review build results using structured detailed log; navigate to specific elements from the log

Download MSBuild Sidekick v2

[Via Larkware.com]

 

Technorati Tags: ,,,

An better approach to visualize build output – BuildConsole.NET

A nice and free tool from Gaston Milano(the author of CoolCommands addin) that allow to visualize your build output.

Features:

  • Open BuildFiles and Solution Files
  • Show and Save Build Reports
  • Support for cancellation
  • Verbosity Configuration
  • Save the history of your builds

BuildConsole

Download BuildConsole.NET

 

Technorati tags: tool, msbuild, dotnet, vs2005

How to run msbuild from your application ?

The following function creates an Engine object and uses the BuildProject method to build a project file.

scriptParams )
{
    // Instantiate a new Engine object
    Engine engine = new Engine();
 
    // Point to the path that contains the .NET Framework 2.0 CLR and tools
    engine.BinPath =
        System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory();
 
 
    // Instantiate a new FileLogger to generate build log
    FileLogger logger = new FileLogger();
 
    // Set the logfile parameter to indicate the log destination
    logger.Parameters = "logfile="+logPath;
 
    // Register the logger with the engine
    engine.RegisterLogger(logger);
 
    Project project = new Project(engine);
 
    project.Load(msbuildScriptPath);
 
    
    // pass params to msbuild file
    foreach (BuildPropertyGroup pg in project.PropertyGroups)
    {
        foreach ( string key in scriptParams.Keys )
        {
            pg.AddNewProperty( key, scriptParams[key]);
        }
        break;
    }
    
    // Build a project file
    bool success = engine.BuildProject(project);
 
    //Unregister all loggers to close the log file
    engine.UnregisterAllLoggers();
 
 
    return success;
}

How to convert older VS .NET projects to MSBuild

There are plenty of reasons you might want to programmatically convert projects from VS7 format to MSBuild format. Maybe you have a bunch of old .csproj files and you’d like to convert them in batch. Maybe you’d like to keep your projects in VS7 format and convert them to MSBuild format on the fly. These are definitely Hack-the-Build-worthy pursuits, so let’s dig in.MSBuild ships with an assembly called Microsoft.Build.Conversion.dll which contains the code that Visual Studio .NET 2005 uses to convert older C# and VB projects into MSBuild format (unfortunately C++ is not supported).

Hack the Build: Converting Older VS .NET Projects to MSBuild