Reputation: 11
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
Reputation: 6695
If the application starts normally and you only want to suppress the warning, there are two options:
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>
Specify the runtime manually when launching the application.
mono --runtime=v4.0 application.exe
Upvotes: 2
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