Skip to content

MSBuild bootstrapper for .NET 3.0 broken?

After Microsoft didn’t include .NET 3.5 in any current release of Windows (read “Vista service pack 1”), some of us developers who believed in long-ago C# 3.0 ads, had to roll back to .NET 3.0 and C# 2.0.

Including me.

Not mentioning pain of rolling back all LINQ tasties in code and debugging our replacements (do you know why you can’t implement Where() just with yield-style function?), it means installing .NET 3.0.

It seemed to be not a problem, having a MSBuild code snippet that worked for 3.5 – just replace 3.5 with 3.0:

<BootstrapperFile Include="Microsoft.Net.Framework.3.0">
<ProductName>.NET Framework 3.0</ProductName>
<BootstrapperFile Include="Microsoft.Windows.Installer.3.1">
<ProductName>Windows Installer 3.1</ProductName>

<Target Name="Bootstrapper">
ApplicationName="blah blah blah blah"
ComponentsLocation="HomeSite" CopyComponents="false"
Culture="en" Path="$(BootstrapperPath)"/>

Won’t work.

Hell why? Who knows. Logs in temp don’t give proper diagnostics, nor system events do. WPF fails to install at some point onto every XP installations we have, including clean special test XP SP2 VMWare images downloaded from Microsoft.

Update: Here’s the answer.

Now I rolled back to dotnetfx3setup.exe redistributable. It’s 2.8M compared to 300K bootstrapper generated by MSBuild, and it’s a pain to see installer grow…And if .NET 3.0 is already installed it starts to uninstall it… and there is no key to make it just “check or install”, need to trick it via WiX.

But we have to pay it. Oh my.

All over the Web I see no evidence that any man walked this path before. For.NET 2.0 – a lot of mentions and code samples. And completely empty for .NET 3.0.


  1. Simon wrote:

    Yes, there’s some brokenness there, though I didn’t realize it was *that broken*

    Posted on 31-Mar-08 at 22:04 | Permalink
  2. Victor Sergienko wrote:

    Thanks Simon.
    ClickOnce is not my case, I do things via WiX and bootstrapper.
    So here’s how it goes.
    Thanks for you forum thread, I’ll try to distribute .NET from my site… though it’s not the way I’d like to spend bandwidth.

    You gave me another idea, looks like MSBuild provides HomeSite attribute, but wrong one…

    Posted on 01-Apr-08 at 13:43 | Permalink
  3. Victor Sergienko wrote:

    Probably more relevant URL to MSDN forums on deploying .NET

    Posted on 01-Apr-08 at 14:34 | Permalink
  4. Vidhya wrote:

    I need your help on to get the setup of my wpf application using Wix 3.0

    Is there a way to check if the system has .net framework 3.5 while installing?
    If it is there, just install the appln without any error and if its not there,install .net 3.5 setup exe and then continue installing the application.

    Can you tell me the steps for the same.

    Can you tell me that what action/condition to do this?

    Waiting for your reply.

    Posted on 16-May-08 at 11:47 | Permalink
  5. Victor Sergienko wrote:

    That’s easy.

    1. Add WixNetFxExtension to references of installer project (that is, link with it).
    2. Add to WXS file:

    <PropertyRef Id=”NETFRAMEWORK30″/>
    <Condition Message=’This program requires the .NET Framework 3.0!’>
    Installed OR NETFRAMEWORK30

    Posted on 19-May-08 at 18:23 | Permalink

Post a Comment

Your email is never published nor shared.