Ronny
Ronny

Reputation: 11

Mono: runtime error: v4.0.30319

I have a big problem with Mono; constantly receiving this error message.

WARNING: The runtime version Supported by This application is unavailable. Using default runtime: v4.0.30319

I have reinstalled the server three times already, but new installs unfortunately always have the same problem.

Upvotes: 1

Views: 8477

Answers (2)

Melebius
Melebius

Reputation: 6695

If the application starts normally and you only want to suppress the warning, there are two options:

Configuration file

Add the configuration file to the directory where the binary is located, with the name <binary-name>.config, e.g. for application.exe use application.exe.config.

The contents of the file should be as following. Of course, the comment is optional.

<?xml version="1.0" encoding="utf-8"?>
<!-- Add this file to the legacy .NET application folder to prevent:
WARNING: The runtime version supported by this application is unavailable. -->
<configuration>
    <startup>
            <supportedRuntime version="v2.0.50727"/>
            <supportedRuntime version="v4.0"/>
    </startup> 
</configuration>

Sources

Command line

Specify the runtime manually when launching the application.

mono --runtime=v4.0 application.exe

Sources

Upvotes: 2

Lex Li
Lex Li

Reputation: 63299

If you use a dissembler to check the assemblies you should see which CLR version they were built against. My guess is that they were built against 2.0.

Mono 4 removes the old 2.0 CLR and 4.0 CLR (in fact 4.5 profile) becomes the default and the only. So this is simply a warning, not an error.

Upvotes: 0

Related Questions