Search Unity

Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e) Copyright (C) Microsoft Corporation.

Discussion in 'Editor & General Support' started by ji-geiko, Apr 26, 2019.

  1. ji-geiko

    ji-geiko

    Joined:
    Jan 2, 2019
    Posts:
    4
    Hello
    I have a problem. Few day ago, I start unity and this error appear on console:


    Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
    Copyright (C) Microsoft Corporation. All rights reserved.
    error CS1704: An assembly with the same simple name 'Editor' has already been imported. Try removing one of the references (e.g. 'D:\unity_project\jeux\blabla\Library\ScriptAssemblies\Editor.dll') or sign them to enable side-by-side.
    Assets\Standard Assets\Utility\ForcedReset.cs(6,27): warning CS0618: 'GUITexture' is obsolete: 'This component is part of the legacy UI system and will be removed in a future release.'
    Assets\Standard Assets\Utility\SimpleActivatorMenu.cs(10,16): warning CS0618: 'GUIText' is obsolete: 'This component is part of the legacy UI system and will be removed in a future release.'


    I've delete "Library" folder and rebuild my project but the problem still appear.

    Do you have any idea how can I fix my issue ?

    Thank you
     
  2. ji-geiko

    ji-geiko

    Joined:
    Jan 2, 2019
    Posts:
    4
    Ok i have solve the error, just move the folders:
    UnityPurchasing and UnityPurchasing.meta in another folder.

    I hope these useful.
    by
     
  3. unity_Kz8sQm7d1kyDHQ

    unity_Kz8sQm7d1kyDHQ

    Joined:
    Jan 25, 2019
    Posts:
    1
    Thank you
     
    eleltofik likes this.
  4. Famigames

    Famigames

    Joined:
    Nov 2, 2018
    Posts:
    1
    Thank you, exactly you say above. i just need rename the folder project.
     
  5. PEMMC

    PEMMC

    Joined:
    Jan 22, 2019
    Posts:
    4
    Simple, I just resolved by deleting the Facebook folder inside the (PLAYBACK) directory of the editor I use.
    This is the Patch:

    C: \ Program Files \ Unity \ Hub \ Editor \ 2019.2.3f1 \ Editor \ Data \ PlaybackEngines
     
    FlightOfOne and mouchtach like this.
  6. AUGMENTX

    AUGMENTX

    Joined:
    Jun 14, 2019
    Posts:
    4
    Am getting on OSX. Don't have any Facebook folder, no UnityPurchasing and no UnityPurchasing.meta ... :/
    Anyone have any other ideas?
    upload_2019-9-2_22-41-6.png
     
  7. kjmitch

    kjmitch

    Joined:
    Nov 20, 2018
    Posts:
    3
    I fixed my issues with this by closing and restarting Unity. Nothing about the error seemed like a real error, and it may indeed be different than those reported above, but I wanted to mention what I did in case it helps.

    The error I got listed *only* the compiler version and Microsoft copyright notice lines, I couldn't clear it at all, and I didn't recognize any relevant information in the Editor logs. I got the error today after updating the mono-devel and related packages on my installation of Fedora 30, using Unity 2019.1.7f1.

    I've gotten a few odd errors like this after updating that supporting software. They don't say much and don't budge until I restart Unity, after which they disappear. I'm thinking I won't see them anymore after I do a fresh restart of the whole system later tonight.
     
  8. Brayitan123

    Brayitan123

    Joined:
    Oct 26, 2016
    Posts:
    2
     
  9. Ramongus

    Ramongus

    Joined:
    Apr 27, 2019
    Posts:
    1
    Hi, in my experience, this error apears when i downloaded the Monetization 3.0 pack. My "package manager" tab in Window->Package Manager it was gone, and i realised that the problem was that i had two different package managing ads, so this cause assembly errors.

    So I went to the Package folder of the project, inside i found the "manifest.json" file.
    I got inside the file and deleted the line:
    "com.unity.ads": "2.3.1",

    Hope this help.

    pd: sorry about my english.
     
    base2lab, Shenae and mcroswell like this.
  10. mcroswell

    mcroswell

    Joined:
    Jan 6, 2010
    Posts:
    79
    I'm getting the similar issues (and have for each upgrade of Unity for the past year or so). Note: I've been using Unity since 2009 and these issues are orders of magnitude worse than anything prior added together!

    I tried to run a new project using 2019.3.6 and .7 and kept getting these errors. I uninstalled all versions re-installed, made empty projects, template-drive ones, etc, all with the same result. Searching on the internet, submitting bug reports to you - nothing works.

    Is this an issue with everyone or what? It's terrible!

    ---------- Typical Error ---------------- Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
    Copyright (C) Microsoft Corporation. All rights reserved.

    error CS0009: Metadata file '/Applications/Unity/2019.3.7f1/Unity.app/Contents/NetStandard/compat/2.0.0/shims/netfx/System.Numerics.dll' could not be opened -- Read out of bounds.
    ------------------------------------------------

    -Mike
     
  11. MikeHarrisXR

    MikeHarrisXR

    Joined:
    Jan 31, 2019
    Posts:
    1
    I have exactly the same error on Mac OSX 10.13.6
     
  12. ksc_3899

    ksc_3899

    Joined:
    Jan 1, 2019
    Posts:
    30
    Just restart the editor. That fixed for me.
     
  13. vanshTandon

    vanshTandon

    Joined:
    Apr 10, 2018
    Posts:
    9
    Hello Did you solve it??
    If yes then please help me
     
    mcroswell likes this.
  14. janeshvarmishra

    janeshvarmishra

    Joined:
    Aug 24, 2015
    Posts:
    5

    we cant restart editor every time man.
     
  15. honor0102

    honor0102

    Joined:
    Jan 30, 2019
    Posts:
    25
    For me , in Windows, there was no description for error and deleting library folder, and restarting windows didn't work
    based on "Florian Lavorel" answer at this topic: https://stackoverflow.com/questions...-0a7-microsoft-visual-c-sharp-compiler-errors I deleted this registry key and done! problem was fixed:

    Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun


    it may fix the problem for someone else also :)
     
    Last edited: May 16, 2021
    jmorange, fzq1111, Ovaap and 5 others like this.
  16. ksc_3899

    ksc_3899

    Joined:
    Jan 1, 2019
    Posts:
    30
    Yeah, I agree. For me the complaint is very very rare. I've been using Unity for the past 2 years and until now, I have had that issue for 2 or 3 times only. So in that case it's okay if I simply restart my editor. But if it's a persistent error you are constantly having, then you need to find some fix to it.
     
  17. sundhar

    sundhar

    Joined:
    Aug 29, 2018
    Posts:
    3
    usually if we create a new c# scirpt or if we delete an existing c# script ,unity will reload....and the error will be cleared...
     
  18. sundhar

    sundhar

    Joined:
    Aug 29, 2018
    Posts:
    3
    just edit any of your code or the script that is showing in the console (for example by adding comments or deleting comments like that),then the scripts will get reloaded ...and error will get cleared
     
  19. Purpuraxmax

    Purpuraxmax

    Joined:
    Mar 30, 2020
    Posts:
    1
    Screenshot (10).png
    I have the same problem. I tried to reinstall, update and all tipps of this discusion, but nothing worked. It is on every project and also on new created projects on every version. I really want to work on my project. I hope it's not gone forever. Please help. Thanks :| -Purpurax
     
    ServantOfSun likes this.
  20. masmear

    masmear

    Joined:
    Apr 29, 2020
    Posts:
    2
    Just restart the editor. that's working for me

     
  21. elbruno

    elbruno

    Joined:
    Nov 25, 2016
    Posts:
    1
    Somehow, this also worked for me.
    Thanks
     
    honor0102 likes this.
  22. mcroswell

    mcroswell

    Joined:
    Jan 6, 2010
    Posts:
    79
    Well, vanshTandon, not "solved" but I do have a method that works to "fix" it. I simply replace those dll's with earlier versions. Be aware this fixes everything (I'm running 2019 versions and the latest 2020 one) and my stuff works but it can't possibly be the "right" fix. If you're still having troubles contact me directly. - Mike Croswell
     
  23. sinjimonkey

    sinjimonkey

    Joined:
    Jul 31, 2013
    Posts:
    72
    I have had this error when building assetbundles for iOS (Works fine for Android). The build fails and because of 'compiler errors' and this is the only error that shows up.

    None of the suggestions in this thread have helped.
     
    aymusbond likes this.
  24. Deepscorn

    Deepscorn

    Joined:
    Aug 13, 2015
    Posts:
    25
    > Ok i have solve the error, just move the folders:
    > UnityPurchasing and UnityPurchasing.meta in another folder.

    When you move UnityPurchasing, Facebook or any other directory with C# scripts in it, you trigger recompile. It's same as changing some of scripts or just right click on directory/script in unity, then choosing Reimport.

    My problem was not floating one. It reproduced on 2 computers. So the problem was in code. Sharing my case:

    Code (CSharp):
    1. public enum ExplosionType
    2.     {
    3.         Default,
    4.         StarWave
    5.     }
    6.  
    7.     public class ExplosionEvent : WorldEvent
    8.     {
    9.         public Vector3 Position;
    10.         public float Radius;
    11.         public ExplosionType ExplosionType;
    12.  
    13.         public ExplosionEvent() {  /* serialization support */ }
    14.         public ExplosionEvent(WorldObject target, in Vector3 position, float radius, ExplosionType type = ExplosionType.Default)
    15.         {
    16.             Target = target;
    17.             Position = position;
    18.             Radius = radius;
    19.             ExplosionType = type;
    20.         }
    21.     }
    The fix is removing default value (ExplosionType.Default) from constructor. For some reason, got this weird error with it (Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e))
     
  25. LDeam

    LDeam

    Joined:
    May 30, 2020
    Posts:
    1
    I had this same issue, but when looking closer at the data stored in the key, it had to do with me installing conda and then allowing it to hook into the command prompt in windows. I don't plan on using conda in the future, so deleting this key wasn't a huge deal
     
    honor0102 likes this.
  26. goku107

    goku107

    Joined:
    Sep 24, 2020
    Posts:
    3
     
  27. unity_RpoONMul8LGCOw

    unity_RpoONMul8LGCOw

    Joined:
    Jun 11, 2020
    Posts:
    1
    I'm also having same problem. Please help

    Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e) Copyright (C) Microsoft Corporation. All rights reserved.

    error CS1703: Multiple assemblies with equivalent identity have been imported: 'C:\Users\Chayan\Downloads\texasHoledmPoker-master\texasHoledmPoker-master\cards\Assets\texasHolde\images\Resources\Mysql Package Unity\Plugins\System.Data.dll' and 'C:\Program Files\Unity\Hub\Editor\2019.4.12f1\Editor\Data\MonoBleedingEdge\lib\mono\4.7.1-api\System.Data.dll'. Remove one of the duplicate references.
     
  28. Robiiii

    Robiiii

    Joined:
    Apr 30, 2017
    Posts:
    4
    It worked for me, thank you very much!
     
    honor0102 likes this.
  29. Waleedraj

    Waleedraj

    Joined:
    Oct 14, 2020
    Posts:
    2
    first remove your project from unity go to project folder double click on any scene in this way your project open in right way and no error occur
     
  30. Deveprof

    Deveprof

    Joined:
    Oct 16, 2019
    Posts:
    1
    that's work for me thank you so much
     
    honor0102 likes this.
  31. doreenjeptoo

    doreenjeptoo

    Joined:
    Nov 24, 2020
    Posts:
    1
    This has worked for me I had tried everything then saw this and it just clicked, I had recently added an autorun script to the registry. I deleted it and restarted Unity and all is well now. Thanks
     
    honor0102 likes this.
  32. unity_iHInQY6pj4TUrg

    unity_iHInQY6pj4TUrg

    Joined:
    Feb 5, 2019
    Posts:
    1
    I HAVE A SOLUTION!!!
    If all solution on the top doesn't work you can try this:
    Don't call folders of your path with a special caractere and dont have a same folder name next to this folder in this path!

    PS: Sorry for my english =)
     
  33. khael_leahk

    khael_leahk

    Joined:
    Feb 15, 2021
    Posts:
    1
    This one worked for me as well, thanks a bunch guys.
     
    honor0102 likes this.
  34. nurick17

    nurick17

    Joined:
    Aug 21, 2020
    Posts:
    1
    I don't understand it, how I can find this path
    Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
     
  35. honor0102

    honor0102

    Joined:
    Jan 30, 2019
    Posts:
    25
    it's a path in windows registry
    press Windows button+R and type Regedit and find the mentioned key, then delete it
     
    goldcloud144 likes this.
  36. jisase

    jisase

    Joined:
    Oct 22, 2020
    Posts:
    17
    Hi, I have the same problem but none of the before solutions have worked... the problem is origin after update the Visual Studio Code of the version 1.55.2 and I use Unity 2020.1.4f1
     
  37. young9484825

    young9484825

    Joined:
    May 2, 2021
    Posts:
    1
    Thank you very much. I've solved a problem I've been thinking about for two days.:)
     
    honor0102 likes this.
  38. Patrick_Rainer

    Patrick_Rainer

    Joined:
    Feb 26, 2018
    Posts:
    49
    Dear all

    In my case I had to delete the /Library/PackageCache folder. There were some corrupt files
     
    honor0102 likes this.
  39. spacesimulationandplanetarium

    spacesimulationandplanetarium

    Joined:
    Jun 27, 2021
    Posts:
    54
    i have this error :
    crosoft (r) visual c# compiler version 3.5.0-dev-20359-01 (8da8ba0c)

    i have it for 1 week, i did everything, but i still have the error.
     
    goldcloud144 likes this.
  40. Quiet-Pixel

    Quiet-Pixel

    Joined:
    Aug 23, 2013
    Posts:
    48
    Ran into the same problem today with a project in 2019.4.20f1 that was working fine 2 days ago. Tried uninstalling all versions and reinstalling Unity, even upgrading to 2019.4.28f1 and rebooting repeatedly. No luck.

    @LDeam mentioned that Conda was causing his problem. I had installed it a few days ago in attempt to add a plugin I need to build NSIS installers. Looking at Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun, it was pointing to Conda. Deleting that registry key fixed the problem immediately.
     
    honor0102 likes this.
  41. FryAppsLtd

    FryAppsLtd

    Joined:
    Jun 5, 2021
    Posts:
    1
    On OSX I went into package manager and removed Advertisement
     
  42. Ovaap

    Ovaap

    Joined:
    Jul 24, 2021
    Posts:
    1
    Thanks! This did the trick for me, spent 1.5 days resolving this.
     
    honor0102 likes this.
  43. lightbug14

    lightbug14

    Joined:
    Feb 3, 2018
    Posts:
    447
    I have finally managed to fix this stupid error :cool:. None of the solutions (mentioned in this thread) worked for me. That register key everyone is talking about wasn't there.

    I'm using Unity 2019 LTS (C# 7.3). Unity 2020 LTS (C# 8) works just fine.

    So, it was time to "Debug" (and by that i mean comment/eliminate class by class until the error was gone xD ... i was desperate). Eventually, i found the cause. This was the method causing trouble:
    The declaration:
    Code (CSharp):
    1. public int Raycast( out HitInfo hitInfo, Vector3 origin, Vector3 castDisplacement,
    2.        in HitInfoFilter filter , bool useSimpleRaycast = false )
    The caller:
    Code (CSharp):
    1. physicsComponent.Raycast(
    2.             out HitInfo hitInfo ,
    3.             origin ,
    4.             - Up * detectionDistance ,
    5.             in filter
    6.         );
    Important: The "filter" struct is private (declared inside the class).

    The Problem:
    Using the "in" keyword inside the caller. If i remove this keyword everything works. Most of the time, you can ignore this keyword since it should be optional. Nevertheless, my OCD demands that keyword to be there :p, so removing it wasn't an option.

    Fixes:
    - Not using the "in" keyword
    Code (CSharp):
    1. physicsComponent.Raycast(
    2.             out HitInfo hitInfo ,
    3.             origin ,
    4.             - Up * detectionDistance ,
    5.             filter   //<----------------
    6.         );

    - Using the "in" keyword + defining the optional paramer

    Code (CSharp):
    1. physicsComponent.Raycast(
    2.             out HitInfo hitInfo ,
    3.             origin ,
    4.             - Up * detectionDistance ,
    5.             in filter ,
    6.             false  //<----------------
    7.         );

    - Using the "in" keyword + using a local struct instead of a private one:

    Code (CSharp):
    1. HitInfoFilter filter = new HitInfoFilter();   //<----------------
    2. physicsComponent.Raycast(
    3.             out HitInfo hitInfo ,
    4.             origin ,
    5.             - Up * detectionDistance ,
    6.             in filter
    7.         );

    I just wanted to share this. It would be interesting to know why exactly this "private struct + in keyword + optional parameter" was causing trouble (C# 8 handled this perfectly).
     
    Last edited: Jul 30, 2021
    honor0102 likes this.
  44. BurnsCommaLucas

    BurnsCommaLucas

    Joined:
    Feb 2, 2019
    Posts:
    1
    I ran into this on Ubuntu 18.04 & 20.04 with Unity 2019LTS, I had a function with a default type and the console would only throw the generic "Microsoft (R) Visual C# Compiler version 2.9.1.65535" error.
     
  45. aka3eka

    aka3eka

    Joined:
    May 10, 2019
    Posts:
    32
    I just had the issue on MacOS and nothing could fix it - not restart of the Unity editor, not code recompile, computer reboot not event Library folder deletion.
    And I didn't update anything. Just changed my C# code. The problem was in using of "in" parameter modifier for methods. I used it incorrectly and for some reason the compiler couldn't compile it for Unity (but did fin in Visual Studio).

    So take a look at you recent code changes.
     
    honor0102 likes this.
  46. Alacer

    Alacer

    Joined:
    Jun 22, 2016
    Posts:
    14
    What worked for me (and I tried a ton of things on multiple computers, install, reinstall, different versions and more), was in the unity hub, create a new project, and in the templates download URP (and I also downloaded VR because I was going to need it) and create a URP project. In this particular case I used 2022.1.0a15 but I doubt it matters.
     
  47. SaumyaSaurav

    SaumyaSaurav

    Joined:
    Oct 7, 2017
    Posts:
    13
    Assests -> Reimport All.

    This fixed the error for me.
     
    honor0102 likes this.
  48. rinatsin

    rinatsin

    Joined:
    Aug 16, 2020
    Posts:
    10
    Hello. I got this error too. Occurred after updating the version of a third-party library, when starting the player. I also needed to debug the library code, so I added pdb files to the project. None of the above helped in my case. The problem was solved by removing the libraries from the project along with the pdb and meta files and reassembling them with the generation of new meta files.

    I also think that in my case the Managed stripping level setting in Player (https://docs.unity3d.com/Manual/ManagedCodeStripping.html) played a key role. It would be nice to hear an explanation from Unity.
     
  49. MomentSum

    MomentSum

    Joined:
    Aug 12, 2022
    Posts:
    1
    Thanks. It solved my problem perfectly. However, I think "autorun" should be a command that runs automatically when CMD starts. It points the unity program to a wrong path
     
    honor0102 likes this.
  50. Alejandrx_o

    Alejandrx_o

    Joined:
    Dec 29, 2022
    Posts:
    1
    I can't find the command processor folder, after entering the microsoft folder, I can't find it anywhere, any help?