May
20
2008

MSBuild and Silverlight 2.0 Beta 1 running in Team City

If you want to integrate Silverlight 2.0 Beta 1 in your Continuous Integration system, in my case Team City), it is better to read the readme of Silverlight 2.0 Beta 1 SDK here.

The important part in our case is the following one:

Using MSbuild to build a solution in a command line doesn’t copy the Silverlight project output to the linked web project

We don’t have complete support for command line msbuild usage to build solutions with Silverlight projects which also includes 64 bits MSBuild support.

So basically I made a copy manually from the source of the Silverlight project to the output path of my MSBuild project:

    <!--HACK Fix the missing copy of ClientBin -->

    <!--http://www.microsoft.com/silverlight/resources/readme.aspx?v=2.0&sdk=true -->

    <!--Using MSbuild to build a solution in a command line doesn’t copy the Silverlight project output to the linked web project

        We don’t have complete support for command line msbuild usage to build solutions with Silverlight projects which also includes 64 bits MSBuild support.

    -->

    <Message Condition=" '$(Configuration)|$(Platform)' == 'Staging|AnyCPU' Text="### HACK Silverlight MSBUILD ###" />

    <MakeDir Condition=" '$(Configuration)|$(Platform)' == 'Staging|AnyCPU' " Directories="$(OutputPath)\ClientBin" ContinueOnError="true" />

    <Copy Condition=" '$(Configuration)|$(Platform)' == 'Staging|AnyCPU' " SourceFiles="$(MSBuildProjectDirectory)\..\..\Sources\VideoPlayer\ClientBin\VideoPlayer.xap" DestinationFiles="$(OutputPath)\ClientBin\VideoPlayer.xap" />

    <!--EndHACK -->

Now my web application is compiled, deployed and works!

Comments (1) -

http://

Thats's good to know that you were able to make  CI work with Team City especially with a silverlight project. When I am running the build , I am getting an error "error MSB4044: The "CompileXaml" task was not given a value for the required parameter "TargetFrameworkDirectory"."


It would be great if you can write a tutorial for the rest of us to show how to setup a build server alogn with the code.


Thanks in advance.

Raj

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About Laurent

Laurent Kempé

Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect and certified Scrum Master.

Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

Laurent was awarded Most Valuable Professional (MVP) by Microsoft from April 2002 to April 2012.

JetBrains Academy Member
Certified ScrumMaster
My status

Twitter

Flickr

www.flickr.com
This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

Month List

Page List