Back to Home

Solving Encoding Issues in Mono

mono · sharpdevelop · MONO_EXTERNAL_ENCODINGS · compilation error · encodings

Solving Encoding Issues in Mono

    Problem.


    In general, this problem can manifest itself in different ways. In my case, it was SharpDevelop, which completely refused to compile Hello world, which is built without errors in the command shell (including through NAnt). At the same time, SharpDevelop was stingy with information:
    Ending '' Gmcs '' with code -1.  (MSB6006)
    After about an hour of quick-blocking and searching for the source of the problems, the development environment agreed to supplement the error information with new useful information:
    Please add the correct encoding to MONO_EXTERNAL_ENCODINGS and try again

    Decision.


    The environment variable " MONO_EXTERNAL_ENCODINGS" is created with the value " default_locale", the shell or development environment is restarted. In my case, the problem no longer appears.

    Read Next