locked
dot net framework as prerequisite RRS feed

  • Question

  • Hello,

    I am working on WPF application and I will be deploying WPF exe on client machine. Client doesn't want to install dot net framework in advance. He wants that, that WPF exe should download the dot net framework if it's not available on machine and then install it.

    As far as my knowledge WPF exe itself will need frameowrk to launch. IS there any way to address this requirement? Client does not want to create a setup project, they want stand alone exe.

    Best regards,

    Sandeep

    Wednesday, August 26, 2020 7:00 AM

All replies

  • Assuming the client has Windows 10 they have .NET Framework installed already. It's a matter of do they have the version you are targeting or not. So you need to educate them.

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Wednesday, August 26, 2020 10:21 AM
  • we are targeting all windows version after 8.1. Thus on some OS it will be installed already and on some OS not.

    Please consider the case, where it has not installed already.  In this case is it possible for WPF exe to download framework first? can we add some code in WPF exe which will download the framework first? It might be the unmanned code. Please let me know.

    Best regards,

    Sandeep

    Wednesday, August 26, 2020 10:41 AM
  • Your installer needs to install any prereqs. Your app cannot install prereqs because it won't run if they aren't there. Even if it did run then you'd still need admin privileges to install most components (like the framework).

    So no you cannot ship a WPF exe that installs its dependencies. You can however ship a single EXE that has the setup logic inside it. Refer to InstallShield, WiX, InstallAnywhere or even ClickOnce to build a setup program that installs your app and any dependencies.


    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, August 26, 2020 2:55 PM