Search Unity

Error: Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)

Discussion in 'Scripting' started by LilyTheThunder, Jul 25, 2019.

  1. LilyTheThunder

    LilyTheThunder

    Joined:
    Dec 4, 2018
    Posts:
    4
    Hey,
    I'm getting this error (and only this error):
    "Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
    Copyright (C) Microsoft Corporation. All rights reserved."
    It's preventing me from pressing play, since all compiler errors must be fixed. Seemed like it broke out of nowhere, it was working fine before.
    I tried basically every solution I found online, including uninstalling/reinstalling Visual Studio and Unity, deleting the Library folder, deleting the solution and csproj files, installing the latest dotnet packages, rebooting of course, changing to a different Unity version. Nothing has worked for me.
    Any ideas?
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    6,511
    Stab in the dark - could you try changing the script runtime version and/or the script backend (in Project Settings -> Player)?

    Definitely file a bug report with Unity if nothing else.
     
  3. LilyTheThunder

    LilyTheThunder

    Joined:
    Dec 4, 2018
    Posts:
    4
    So it's fixed now, but I don't know why. I changed to an earlier version of 2019 and changed branch doing a clean, had some errors in a package (Multiplayer HLAPI) so I updated that package to fix the errors, and the compiler error went away! Maybe forcing a package update does the trick? I've seen other threads mentioning package changes.
     
  4. LilyTheThunder

    LilyTheThunder

    Joined:
    Dec 4, 2018
    Posts:
    4
    Changed branch again and it's back...
     
  5. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    6,511
    My guess is that there's an actual compile error in the code where you see the issue, but there's a problem with the compiler just in terms of actually outputting the error. My next thought would be: Does ANY compiler error break your compiler (indicating your compiler is well and truly broken), or is it one specific, obscure compile error that causes this (indicating that you've stumbled upon a strange edge case of compilation)? If you start with your "no goofy errors" branch and insert an obvious syntax error, does it give you this same error message, or the syntax error you expect?
     
  6. LilyTheThunder

    LilyTheThunder

    Joined:
    Dec 4, 2018
    Posts:
    4
    SOLVED: it's a compiler error, had a function that takes a parameter MyFunction(in myStructParam), and when calling it I explicitly put the "in" keyword in front (localVar.MyFunction(in myLocalStruct). This gave the compiler error, but writing it like (localVar.MyFunction(myLocalStruct) without the "in" fixed the problem. What's weird is that I call this function some other place with the "in" and it's fine.