none
Prerequisite could not be found for bootstrapping RRS feed

  • Question

  • I have a WinForms VB .Net application which I distribute via ClickOnce. The application targets the .NET Framework 4.0 as unfortunately we have clients using it on Windows XP. I am using Visual Studio 2017 (version 15.4.5) on Windows 10 Pro (build 16299.64).

    I would like to make .Net 4.0 a prerequisite so that if the client doesn't have it installed, it gets automatically downloaded and installed for them.

    If I go to my project's Properties, and then to Publish and then Prerequisites, i see that "Microsoft .NET Framework 4 (x86 and x64)" has a warning/yield icon next to it, with the following tooltip:

        "Prerequisite could not be found for bootstrapping"

    I also have this error with ".NET Framework 3.5 SP1 Client Profile", but the rest of the frameworks (4.5.2, 4.6, 4.6.1 and 4.6.2) are fine.

    I have tried installing the .NET Framework 4.0 Developer Pack, but it didn't help. If I go to the path where Visual Studio 2017 supposedly looks for bootstrap packages (C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages) I see the following:

    I'm guessing there should be a folder called DotNetFx40 that's not there?

    Any ideas? Thanks.


    Fabricio Rodriguez - Pretoria, South Africa



    • Edited by Fabs1977 Tuesday, November 28, 2017 7:50 AM
    Tuesday, November 28, 2017 7:40 AM

Answers

  • On my system the file is at:

       C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\DotNetFX40

    I read where someone copied that folder to the clickonce bootstrapper folder you are showing and then it starts to work.

    You can also check in windows control panel and see it the .net 4 multi-targeting pack is installed on your system. If so you can see if selecting repair does anything. If not maybe that is the problem it is not installed. I have it on both my windows 7 and 10 systems in the folder I show.

    You should ask in the visual studio setup forum maybe someone there knows more. Possibly other forums.

    PS If you are not actually using something only in .net 4 then why not use 3.5? .net4 is not to be supported in the future on xp but .net 3.5 is.

    Finally, another approach is to use the allow legacy .net that you put in app.config and then on xp with no 4 it will use .net 2. But your app has to be able to run on .net2. You may find you don't use anything that is not in .net 2. Can your app run on your system in 3.5 or even .net2?

    • Edited by tommytwotrain Tuesday, November 28, 2017 12:56 PM
    • Marked as answer by Fabs1977 Tuesday, November 28, 2017 2:24 PM
    Tuesday, November 28, 2017 12:51 PM

All replies

  • On my system the file is at:

       C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\DotNetFX40

    I read where someone copied that folder to the clickonce bootstrapper folder you are showing and then it starts to work.

    You can also check in windows control panel and see it the .net 4 multi-targeting pack is installed on your system. If so you can see if selecting repair does anything. If not maybe that is the problem it is not installed. I have it on both my windows 7 and 10 systems in the folder I show.

    You should ask in the visual studio setup forum maybe someone there knows more. Possibly other forums.

    PS If you are not actually using something only in .net 4 then why not use 3.5? .net4 is not to be supported in the future on xp but .net 3.5 is.

    Finally, another approach is to use the allow legacy .net that you put in app.config and then on xp with no 4 it will use .net 2. But your app has to be able to run on .net2. You may find you don't use anything that is not in .net 2. Can your app run on your system in 3.5 or even .net2?

    • Edited by tommytwotrain Tuesday, November 28, 2017 12:56 PM
    • Marked as answer by Fabs1977 Tuesday, November 28, 2017 2:24 PM
    Tuesday, November 28, 2017 12:51 PM
  •  

    "Prerequisite could not be found for bootstrapping"

    What would that be? Maybe, you left the rest of the error message out?

    Tuesday, November 28, 2017 1:22 PM
  • Thanks tommytwotrain, going to a lower version of .NET is not actually a bad idea. I'll have to check if I'm not sign any .Net 4.0 specific features. I am busy downloading the "Multi-Targeting Pack for Microsoft .NET Framework 4.0.3 (KB2600213)" - maybe I have some luck with that...

    Fabricio Rodriguez - Pretoria, South Africa

    Tuesday, November 28, 2017 1:28 PM
  • Hi DA924x - nope, that's the whole error message I'm getting. Well, more like a warning... I get it on a tooltip that appears when hovering the mouse over the prerequisite with the warning/yield triangle.

    Fabricio Rodriguez - Pretoria, South Africa

    Tuesday, November 28, 2017 1:30 PM
  • Thanks tommytwotrain, going to a lower version of .NET is not actually a bad idea. I'll have to check if I'm not sign any .Net 4.0 specific features. I am busy downloading the "Multi-Targeting Pack for Microsoft .NET Framework 4.0.3 (KB2600213)" - maybe I have some luck with that...

    Fabricio Rodriguez - Pretoria, South Africa

    I think the only new thing you might use in .net4 that wont work in .net3.5 is ASYNC.

    Yes, well I looked at making my app do this .net4 but I don't need it. So 3.5 is working for me xp thru 10. And that is the version that will be supported in the future. Not .net4.

    I would even consider changing my app so it does run only on 3.5 as I think using 4 on xp may be heading you for a world of support hurt of your app that is constantly breaking on some systems in the future.

    Tuesday, November 28, 2017 1:38 PM
  • This is correct. Support for .NET Framework 4.0 ended on 1/12/2016 so it would not be included for ClickOnce in VS 2017. Since you are using XP, which is no longer supported either, I would target 3.5 as suggested by tommytwotrain.

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Tuesday, November 28, 2017 2:23 PM
  • Thanks Paul!

    Fabricio Rodriguez - Pretoria, South Africa

    Tuesday, November 28, 2017 2:24 PM