.NET: Microsoft Technologies based on the .NET software framework. Runtime: An environment required to run apps that aren't compiled to machine language.
Yes. The publisher must provide a valid deployment.
The error means the app is being treated as a self-contained app because <appname>.runtimeconfig.json is missing. Without that file, the .NET host cannot determine the target framework. If hostpolicy.dll is also missing from the application directory, the app cannot start as self-contained either.
Supported paths are:
- Framework-dependent deployment
- The app must include its
.runtimeconfig.jsonso the host can identify the required framework. - The required compatible runtime must then be installed on the machine.
- The app must include its
- Self-contained deployment
- The publisher must publish the app with the .NET runtime included so the target machine does not need a separate runtime installation.
Installing .NET Runtime, Desktop Runtime, ASP.NET Core Runtime, or the SDK on the machine does not fix a package that is missing its required deployment files. The app package itself must be correct.
There is no supported way to make an arbitrary third-party .exe run when the required .runtimeconfig.json and self-contained host files were not provided. The practical resolution is for the publisher to redistribute the app as either:
- a properly packaged framework-dependent app with
.runtimeconfig.json, or - a properly packaged self-contained app that includes the runtime components.
If the publisher intended a single-file deployment, that must be produced during publishing. A missing .runtimeconfig.json in a normal framework-dependent app causes the host to assume self-contained behavior, which then requires the self-contained files to be present.
References: