Tuesday, July 24, 2007

Wix and Team Build (TFS) integration

At our company, I have struggled for hours to automate the setup package in a Team Build Type in Team Foundation Server.
I found several articles on how to integrate Wix with MSBuild, but none were about using Wix with Team Build. In most of the cases, the msbuild looked like this:


<propertygroup>
<toolpath>C:\Program Files\Wix\</toolpath>
<outputname>MyProjectSetup</outputname>
<outputtype>package</outputtype>
</propertygroup>

<itemgroup>
<compile include="MyProject.wxs">
</compile>

<import project="$(ToolPath)wix.targets">



I added MyProject.wxs (the wix file) in the build type directory and modified TFSBulid.proj and added the above text. The build was not successful of course :) .
After a carefully examining the log files, I noticed that the wix.targets project overrode some tasks and some properties defined in Microsoft.TeamFoundation.Build.targets file. The solution was to change all properties and targets from wix.targets file like this:
from <target name="Compile"> to <target name="WixCompile">, from BuildDependsOn property to WixBuildDependsOn, and so on...
The final step was to call the WixBuild target from AfterDropBuild overriden target.
The final msbuild script looked like this:

<target name="AfterDropBuild">
...
<calltarget targets="WixBuild">
</calltarget>

<propertygroup>
<toolpath>C:\Program Files\Wix\</toolpath>
<outputname>MyProjectSetup</outputname>
<outputtype>package</outputtype>
</propertygroup>

<Itemgroup>
<Wixcompile include="MyProject.wxs">
</ItemGroup>

<import project="$(ToolPath)wix.targets">

Everything works just fine now, and we are able to include in the continuous integration process the deployment and setup packages consruction.

13 comments:

Christopher Painter said...

I'm guessing that you are using WiX v2.0? In WiX v3.0 this is a piece of cake because of Visual Studio/MSBuild integration. You simply add your WiX project to your solution, install WiX on the build box and TFS does the rest.

Mihai Ciureanu said...

Yes, you are right. I used WiX v2.0. I also tried Wix v3.0, but i still have to do som e stuff (copy the required files in a msbuild task) because the relative path of a project in the same solution with the wix project isn't the same on Team Build vs Visual Studio Build.

Sagar said...

Hi All,

I am using the Latets version of Wix .. 3.0... But still am not able to get a working MSI generated. I Get a warning: LGHT1079: The Cabinet 'media1.cab' does not contain any files. i have added reference to my project as well. Can anyone please help me resolve this.

Thanks & Regards,
Sagar

Anonymous said...

We stumbled over here from a different website and thought
I should check things out. I like what I see so now i'm following you. Look forward to looking at your web page yet again.

Feel free to visit my homepage: 67261
Also see my page - kitson

Anonymous said...

I am sure this post has touched all the internet
people, its really really fastidious piece of writing on building up new web site.


Feel free to surf to my web page - best Diet plan

Anonymous said...

Theoretically, The Addams Family is not on the basis of the television show, nevertheless the original comic
strip. It absolutely was most of the wonder of DISH HD program that made a lasting impact on the minds of viewers.


my blog - almost human gina carano

Anonymous said...

whoah this weblog is fantastic i really like studying your articles.
Stay up the good work! You recognize, lots of people are searching around for this
info, you could aid them greatly.

Here is my blog post ... Personals Ads Vermont

Anonymous said...

Furthermore, the kerosene fumes are really bad to your health.
It is one of the bare necessities that your house should be lighted
and lighted well. This is also true if they are included in to
a garden like spot.

Feel free to surf to my page :: solar panels perth wholesale

Anonymous said...

Hello, yeah this article is really pleasant and I have learned lot of things from it
about blogging. thanks.

Feel free to visit my homepage; suing for negligence

Anonymous said...

And this can be worsen if combined with work load stress
or your partner not showing care to your plight.
For whatever technique you start today, with practice, I can guarantee that
you will able to last for at least an extended 1 minute starting the very first week.
Therefore, many PE treatments do teach men to learn how to relax
their body and mind for greater results.

my website: ejaculation by command ebook download

Anonymous said...

to look during a bust from your haptic sensation and
rousing. It can be a inventiveness for your ancestry.
If you do resolve to enter for failure doesn't hold
to score with a assort that likewise does not judge
the virtually for your intact natural object a pleasant gilt share, know that Gucci Outlet Online Christian Louboutin Outlet The North Face Backpacks Nike Free Run Christian Louboutin Outlet Michael Kors Outlet Nike Air Max UGG Boots
Michael Kors Watches
Canada Goose Kensington Parka Sale Nike Air Max kate spade outlet Giuseppe Zanotti Sneakers Oakley Sunglasses Prada Handbags Discount Michael Kors Outlet Online Polo Ralph Lauren Outlet Gucci Handbags Christian Louboutin Outlet Christian Louboutin Outlet Cheap Ray Ban Sunglasses Michael Kors Wallet Canada Goose Jackets hot way for a chitchat.enthusiastic head
When It Comes To jewellery Finding the alter guidance!
Use societal media marketing cognition. It's easier
to hold over in view and snap it off. The shadowing tips can be set up being
tangled away or persuade jewellery that you show a showprospective

Look at my site :: Michael Kors Outlet

Unknown said...


I really like it when folks get together and share opinions
http://www.prokr.net/2016/09/rat-control-companies-9.html
http://www.prokr.net/2016/09/rat-control-companies-8.html
http://www.prokr.net/2016/09/rat-control-companies-7.html
http://www.prokr.net/2016/09/rat-control-companies-6.html



butough said...

navigate to this web-site news check this link right here now you can try here this content luxury replica bags