0

I'm getting the following error:

ERROR: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'net6coreruntime_x86\dotnet-runtime-6.0.2-win-x86.exe' for item '.NET Runtime 6.0.2 (x86)' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=616018.

But I've no idea where you put the dotnet-runtime-6.0.2-win-x86.exe

  • This question already has an answer: https://stackoverflow.com/questions/28709432/how-to-enable-download-prerequisites-from-the-same-location-as-my-application – clhereistian Jul 11 '22 at 15:22
  • Thanks for you help. But in the article you suggested, there seems to be no consensus on what the correct solution is. – Robert Wright Jul 12 '22 at 09:33
  • You used to do this through merge modules, https://learn.microsoft.com/en-us/cpp/windows/redistributing-components-by-using-merge-modules?view=msvc-170, but it appears that is now deprecated. There are probably some links here that may help. – Doc Jul 12 '22 at 13:01
  • Which installation tool is being used? Installshield or Wix? – Vivek Jaiswal Jul 13 '22 at 07:36

2 Answers2

1

You need to put the folder and indicated prerequisite files per the guidance link below. This is only the case where you setup the prerequisites to "Download prerequisities from the same location as my application".

Local Development Machine Bootstrap File Locations

From personal experience, I found that most packages could be put in the

%ProgramFiles(x86)%\Microsoft SDKs\ClickOnce Bootstrapper\Packages\

But that was NOT the case with the net6coreruntime_x86*dotnet-runtime-6.0.5-win-x86.exe*. The file for the runtimes need to go into your Visual Studio Install folder per the note in the Microsoft article above. Here is the path from that article.

<VS Install Path>\MSBuild\Microsoft\VisualStudio\BootstrapperPackages
Bham503
  • 198
  • 9
  • For Visual Studio Enterprise, my bootstrapper path was C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\BootstrapperPackages – Steve Aug 02 '23 at 04:04
0

I assume that the prerequisites files that you’re looking for refer to .NET Runtime 6.0.2 (x86). Microsoft Docs provides the official guide concerning this issue, entitled “How to check that .NET is already installed”.

In this article, “Check runtime versions” part could work for this.:

Type and run dotnet --list-runtimes command in Command Prompt / Windows PowerShell / Windows Terminal to check where .NET Runtime has been installed. (The default installation path of .NET runtime is C:\program files\dotnet\shared\{runtime-type}\{version}\.) ( (x86) would be affixed to the program files directory if it’s on a 32-bit system.)

If it’s already been installed in a certain directory path but still in error, go through [System Properties] - [Advanced] - [Environment Variables] to check whether the installation directory path of .NET is registered as an environment variable.

Namwoo Kim
  • 14
  • 2
  • Thanks for your help, but this doesn't answer my question. I'm trying to include the dotnet-runtime-6.0.2-win-x86.exe with my installer, so that the user doesn't need to hunt for it on the web. Plus, ideally get the installer to apply it before installing my program. The error occurs when I build my installer, it is not finding dotnet-runtime-6.0.2-win-x86.exe – Robert Wright Jul 11 '22 at 14:44
  • I've got it. I just couldn't figure out how you want to include .NET Runtime in your installer. I thought it's about how to install and check .NET Runtime on your local directory path. – Namwoo Kim Jul 11 '22 at 15:28