Runtime Prerequisites
-
If I want to publish an app for public consumption (in the Microsoft Store), in the past I just compiled it to AnyCpu, and targeted a low enough .NET Framework to not worry about the prerequisite runtime (that was probably wrong). But now I'm updating my app to .NET 7, and I have to assume most users won't already have it. Do I need to compile 3 separate packages, one each listing a prerequisite for the .NET 7 runtime for x64, x86, and ARM, or will it install only the correct version if I mark them all as prerequisites, or is there some way to set prerequisites conditionally? What is the right use and purpose of AnyCpu if you always need to confirm that the right, specific runtime is installed? I'm a self-taught, very amateur programmer, so I think I need to stick to the simple installers Visual Studio creates rather than some self-assembled command-line system that might be able to manually figure out what needs to be installed on every computer.
-
If I want to publish an app for public consumption (in the Microsoft Store), in the past I just compiled it to AnyCpu, and targeted a low enough .NET Framework to not worry about the prerequisite runtime (that was probably wrong). But now I'm updating my app to .NET 7, and I have to assume most users won't already have it. Do I need to compile 3 separate packages, one each listing a prerequisite for the .NET 7 runtime for x64, x86, and ARM, or will it install only the correct version if I mark them all as prerequisites, or is there some way to set prerequisites conditionally? What is the right use and purpose of AnyCpu if you always need to confirm that the right, specific runtime is installed? I'm a self-taught, very amateur programmer, so I think I need to stick to the simple installers Visual Studio creates rather than some self-assembled command-line system that might be able to manually figure out what needs to be installed on every computer.
[Publish apps and games to the Microsoft Store – Develop for Microsoft | Microsoft Developer](https://developer.microsoft.com/en-us/microsoft-store/)
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
-
If I want to publish an app for public consumption (in the Microsoft Store), in the past I just compiled it to AnyCpu, and targeted a low enough .NET Framework to not worry about the prerequisite runtime (that was probably wrong). But now I'm updating my app to .NET 7, and I have to assume most users won't already have it. Do I need to compile 3 separate packages, one each listing a prerequisite for the .NET 7 runtime for x64, x86, and ARM, or will it install only the correct version if I mark them all as prerequisites, or is there some way to set prerequisites conditionally? What is the right use and purpose of AnyCpu if you always need to confirm that the right, specific runtime is installed? I'm a self-taught, very amateur programmer, so I think I need to stick to the simple installers Visual Studio creates rather than some self-assembled command-line system that might be able to manually figure out what needs to be installed on every computer.
Yuppers wrote:
Do I need to compile 3 separate packages,...
What you actually need to do specifically is test it in all of the environments you are going to claim to support. If it works (when tested) then you do not need to do anything differently. If it fails testing then you will need to decide what changes are needed.
-
If I want to publish an app for public consumption (in the Microsoft Store), in the past I just compiled it to AnyCpu, and targeted a low enough .NET Framework to not worry about the prerequisite runtime (that was probably wrong). But now I'm updating my app to .NET 7, and I have to assume most users won't already have it. Do I need to compile 3 separate packages, one each listing a prerequisite for the .NET 7 runtime for x64, x86, and ARM, or will it install only the correct version if I mark them all as prerequisites, or is there some way to set prerequisites conditionally? What is the right use and purpose of AnyCpu if you always need to confirm that the right, specific runtime is installed? I'm a self-taught, very amateur programmer, so I think I need to stick to the simple installers Visual Studio creates rather than some self-assembled command-line system that might be able to manually figure out what needs to be installed on every computer.
You might consider whether .NET 7 is appropriate versus .NET 6. The pattern has generally been for every other .NET release to be an LTS (long-term service~3yrs) release versus an STS (~1.5yrs) release. .NET 7 will hit end of support May 14, 2024. .NET 6 will hit end of support November 12, 2024. Meanwhile, we should see an LTS of .NET 8 in November.