Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

CSharpCodeProvider throws a TypeException in Builds

Discussion in 'Scripting' started by QFSW, Oct 13, 2018.

  1. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,320
    Hi, I'm using CSharpCodeProvider and CodeDom to provide runtime compilation support to a console. In the windows editor, 2018.2 +. NET 4 this works perfectly fine. In a Mono build however, it fails to work. It looks for the mono .exe in a strange non existent path. (if my build was at a/b/c/build, it looks for it in a/b/mono.../ etc) and throws an exception.

    I have a few questions:
    A) Is CSharpCodeProvider only supported on Windows or on other platforms too?
    B) Why is it failing in the build?
    C) How can this be fixed or circumvented?

    Thanks
     
  2. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,414
  3. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,320