none
Deployment project breaks on VS 2010 upgrade; need .NET 2.0 download-on-demand

    Question

  • I built a .NET 2.0 application and deployment project using Visual Studio 2008. I turned on the "Create setup program to install prerequisite components" option, selected ".NET Framework 2.0 (x86)" as a dependency, and turned on "Download prerequisites from the component vendor's web site." All worked fine.

    Today I removed Visual Studio 2008 and upgraded to Visual Studio 2010. Now I get a build error "Could not find prerequisite '.NET Framework 2.0 (x86)' in path 'C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\'. So I downloaded the bootstrapper component from http://msdn.microsoft.com/en-us/vstudio/bb898654.aspx and changed the prerequisite in the deployment project to ".NET Framework 2.0 SP2" and also selected "Windows Installer 3.1", which wasn't selected (or needed) before. Now I get the error "No 'HomeSite' attribute has been provided for '.NET Framework 2.0 SP2', so the package will be published to the same location as the bootstrapper." The bootstrapper download URL above warned me that...

    These packages do not support the "Download components from the component vendor's web site." option. If this option is selected, the bootstrapper will build successfully and will show some build warnings that indicate that no Homesite link was found. As a result, these specific packages will be run from the same location as the bootstrapper and will require the installation files (which are copied to the build output folder) to be copied along with the built setup.exe file.

    And according to http://blogs.msdn.com/astebner/archive/2009/03/03/9457968.aspx ...

    If you would prefer to have download-on-demand functionality for the .NET Framework in your setup, then you should use the .NET Framework 3.5 SP1 bootstrapper package instead.

    The problem is that I distribute my application on web sites where I can only supply a single binary. With VS 2008, this was fine since the setup.exe bootstrapper would download the framework 2.0 if it was needed. But now with VS 2010, this no longer seems possible. I'm not sure what has changed. Maybe I was using a bootstrapper for a pre-SP2 version of the framework that did support downloading on demand.

    How do I regain the download-on-demand functionality? Why can't I just create my own distribution URL and choose "Download prerequisites from the following location"? If it were that easy, why does Aaron Stebner suggest this isn't possible? I'm worried that if I change the bootstrapper to 3.5 SP1 then the install will be MUCH bigger. All my application needs is 2.0 and I don't want customers to have to download more than that. How much bigger is the 3.5 download than 2.0 on a Windows XP SP2 box? Is there some way to retain the VS 2008 functionality in VS 2010, perhaps by somehow installing the previous version of the bootstrapper?

    Friday, April 16, 2010 6:26 AM

Answers

  •  

    Ok, I couldn't wait to find out, because our application targets .NET 2.0, and we are moving to VS2010.

    If you take the .NET 2.0 package from the VS2008 bootstrapper packages folder and copy it to the corresponding location for VS2010, it works fine. I tested it in a virtual machine running Windows XP and no .NET.

    On Vista or Windows 7, the VS2008 packages are here:

    c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFX (this is .NET 2.0)

    On Vista or Windows 7, the VS2010 packages are here:

    c:\Program Files\Microsoft SDKs\Windows\v7.0A\BootStrapper\Packages

    Hope that helps. Thanks for posting that question; I didn't realize they had done that. Grrrr.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Friday, April 16, 2010 9:07 AM
  • Actually the .NET 2.0 SP2 bootstrapper fails on Windows 7 after displaying a series of confusing dialogs. The bootstrapper documentation states "These packages provide support for x86 and x64 operating systems, however they do not support and will fail to install on Windows Vista or subsequent operating systems. To provide a prerequisite that will install on Windows Vista, use the .NET Framework 3.5 SP1 bootstrapper package instead."

    So for me the simplest option to get .NET 2.0 on client computers is to use the pre-SP2 .NET 2.0 bootstrapper from VS 2008. This supports download-on-demand, and works on XP, Vista, and seems to work on Windows 7.

    Using the 3.5 or later bootstrappers can result in a long undesirable download if any version of .NET is already on the computer.

    The only way I can use the .NET 2.0 SP2 bootstrapper is to ensure it only gets launched on Windows XP. Perhaps I can figure out a way to launch the .msi directly on Windows Vista or Windows 7.

    • Marked as answer by JustinMag Friday, May 07, 2010 4:40 AM
    Monday, April 19, 2010 11:29 PM

All replies

  • Hi JustinMag,

    In VS 2010, it doesn’t support you to set .NET Framework 2.0 as prerequisite. You can set .NET 3.5 SP1 client profile instead. Although your application is still build target to .NET 2.0, .NET 3.5 client profile is a light weight .NET framework run time which supports to run .NET 2.0 based application. So Microsoft removes .NET 2.0 from the prerequisite list.

    Hope it helps. If you have anything unclear, please tell me.

    Sincerely,
    Kira Qian
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework!
    Friday, April 16, 2010 8:00 AM
  • I can't believe that. VS2010 allows you to program applications that target .NET 2.0, why wouldn't they provide a prerequisite?

    Not everybody can install .NET 3.5. As you must know, if the user has any version of .NET on the machine, even 1.1, it will install NOT the .NET 3.5 client framework, but the whole .NET 3.5 Framework. This can take over an hour to download and install.

    What's really vexing is .NET 2.0, .NET 3.0, and .NET 3.5 show up in my list of prerequisites with yellow warning icons on them. Why even put them in the list? Can you take the .NET 2.0 package from VS2008 and put it in there and it will work?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Friday, April 16, 2010 8:28 AM
  •  

    Ok, I couldn't wait to find out, because our application targets .NET 2.0, and we are moving to VS2010.

    If you take the .NET 2.0 package from the VS2008 bootstrapper packages folder and copy it to the corresponding location for VS2010, it works fine. I tested it in a virtual machine running Windows XP and no .NET.

    On Vista or Windows 7, the VS2008 packages are here:

    c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\DotNetFX (this is .NET 2.0)

    On Vista or Windows 7, the VS2010 packages are here:

    c:\Program Files\Microsoft SDKs\Windows\v7.0A\BootStrapper\Packages

    Hope that helps. Thanks for posting that question; I didn't realize they had done that. Grrrr.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Friday, April 16, 2010 9:07 AM
  • Thanks for the help. Unfortunately I no longer have the old bootstrapper component on my computer. I think it was erased when I removed Visual Studio 2008 and all its components. I'll ty to find it on the Visual Studio 2008 installation media.

    VS 2010 does make it easy to set a prerequisite of .NET 2.0 SP2, which is fine for me (I think). I just downloaded it from the Microsoft web site and it appears in the deployment project as a possible prereq. The problem is that it doesn't support the "Download from the component vendor's web site" option. To enable this scenario, can I just copy those bootstrapper packages to my web site and then point the deployment project at that URL? If yes, I'm curious why Microsoft doesn't support this. Maybe there is some technical reason why bootstrapper needs to be in the same directory as the installation program. Even if I test it and it seems to work for me, I'm worried there will be cases where it won't work. Any info on this?

    Friday, April 16, 2010 7:36 PM
  • Hi Justin,

    I think this is Microsoft's way of, um, encouraging you to upgrade. (And me; our company targets .NET 2.0 with our app.) There's no reason it HAS to be in the same folder as your deployment.

    For .NET 2.0 SP2, you have to either include the package in the deployment (deploy it in the same place as your deployment) or set the homesite URL in it to a location on your website and mark it as 'get it from the vendor's website' (which means get it from the homesite url). Try opening the package with the Bootstrapper Manifest Generator and looking at the values. I think that will work.

    I chose to copy the prereq package from VS2008 to VS2010. It works great, and downloads from Mcirosoft. Do you no longer have the installation media for VS2008? You could see if they still have the express packages online somewhere, and install that long enough to get the .NET 2.0 package from it!

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Saturday, April 17, 2010 5:55 AM
  • I got a similar answer here: http://blogs.msdn.com/astebner/archive/2009/03/03/9457968.aspx

    Rather than using the .NET 2.0 from Visual Studio 2008, I figured that it is best upgrade and require the SP2 version of .NET 2.0. Since that version doesn't support downloading from Microsoft, I put the bootstrapper on my own web site and changed the deployment project option to look there. I tested it on Windows XP with and without the .NET framework, and it seemed to work fine. But when I tested it on Windows 7 - my development box - the bootstrapper pops up a message saying it wants to run "patchcheck.exe", presumably to find out if I've got SP2. This could be annoying/confusing for customers and it seems kind of weird, because I assume that Windows 7 would certainly have the fixes to .NET 2.0. I tried to find out what version of the .NET 2.0 framework I've got based on http://msdn.microsoft.com/en-us/kb/kb00318785.aspx and the version of mscorlib.dll is 2.0.50727.4927; this version isn't documented in the support article. I'll research this some more but would like to find a way to require .NET 2.0 SP2 and do download-on-demand without popping up annoying installation dialogs, especially for users of Windows 7.

    Monday, April 19, 2010 10:48 PM
  • Thanks for reporting back on your progress. If you do figure that out, please do post back, because there will definitely be someone else looking for that information.

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Monday, April 19, 2010 10:54 PM
  • Actually the .NET 2.0 SP2 bootstrapper fails on Windows 7 after displaying a series of confusing dialogs. The bootstrapper documentation states "These packages provide support for x86 and x64 operating systems, however they do not support and will fail to install on Windows Vista or subsequent operating systems. To provide a prerequisite that will install on Windows Vista, use the .NET Framework 3.5 SP1 bootstrapper package instead."

    So for me the simplest option to get .NET 2.0 on client computers is to use the pre-SP2 .NET 2.0 bootstrapper from VS 2008. This supports download-on-demand, and works on XP, Vista, and seems to work on Windows 7.

    Using the 3.5 or later bootstrappers can result in a long undesirable download if any version of .NET is already on the computer.

    The only way I can use the .NET 2.0 SP2 bootstrapper is to ensure it only gets launched on Windows XP. Perhaps I can figure out a way to launch the .msi directly on Windows Vista or Windows 7.

    • Marked as answer by JustinMag Friday, May 07, 2010 4:40 AM
    Monday, April 19, 2010 11:29 PM
  • I have the same problem and I am using the VS2005 for setup deployment and vs2010 for compile. Only MS can produce this kind of nonsense w/o going out of business. The only reason for using vs2010 becasue it fixed the code-behind 'horror'. 

     

    Frank

    Monday, October 25, 2010 1:24 AM
  • They stopped carrying all of the versions in each successive version of Visual studio because they take up too much space. After all, .NET 2.0 is 5 years old, which is pretty ancient in technology. ;-) And if I remember correctly, .NET 3.5 is like 160MB or so. I guess they have to draw the line somewhere.

    Good luck!

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev
    Wednesday, October 27, 2010 6:11 AM
  • This happened to me using .net 3.5 "WARNING: Could not find prerequisite '.NET Framework 3.5 (x86)' in path 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\'", turns out I had to change my Setup->Setup Property Pages-> Prerequisites to .NET Framework 3.5 SP1 (i did not have 3.5 only as in VS 2008).

    And I had to use ".NET Framework 3.5 Client Profile" in the Launch Conditions!

     

    Regards, Mark 


    Sunday, March 20, 2011 5:25 PM