How to install .NET framework 4.0 as part of installation?

后端 未结 3 687
悲哀的现实
悲哀的现实 2020-12-15 13:03

I created bootstrapper,it works but it does not install NET Framework 4.0. After the installation completed my application does not start because no NET Framework 4.0. Why

3条回答
  •  温柔的废话
    2020-12-15 13:56

    I used dotnetinstaller for checking and installing pre-requisites. Its very simple and easy to use. Also it provides the facility to convert msi into exe and attaching UAC prompt. You need to have an configuration file

    Then in your project in post-build event add this code. This will embed your msi and pre-requisite file.

    copy /Y "$(ProjectDir)Files\dotnetfx35setup.exe" "C:\Windows\Temp"
    copy /Y $(TargetPath) "C:\Windows\Temp"
    "$(SolutionDir)Tools\dotNetInstaller 2.0\Bin\installerLinker.exe" /o:"$(TargetDir)Setup.exe" /t:"$(SolutionDir)Tools\dotNetInstaller 2.0\Bin\dotNetInstaller.exe" /c:"$(ProjectDir)Files\Configuration.xml" /b:"$(ProjectDir)Files\banner.bmp" /Embed+ /Verbose+
    

提交回复
热议问题