Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  6. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    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,283
    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. LurkingNinjaDev

    LurkingNinjaDev

    Joined:
    Jan 20, 2015
    Posts:
    1,937
  3. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,283