Search Unity

  1. Unity 2019.1 beta is now available.
    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. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. 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,307
    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:
    2,867
  3. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,307