Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by The-Britain · Jul 09, 2015 at 07:54 AM · errordebugmonocompiletrace

DEBUG;TRACE; Compile Problems

I have a simple project with a couple of relatively simple scripts. I am getting this error when I try to compile:

An item with the same key has already been added. (Error: System.ArgumentException) (Assembly-UnityScript)

Now, if I remove this line from both of the project Assembely-CSharp->Options->Compiler->Define Symbols and Assembely-UnityScript->Options-Compiler->Define Symbols:

DEBUG;TRACE;

It will compile, however, every single time I add a new script, it is back, and it's becoming quite a nuisance.

I've tried deleting everything but the assets and config folder, and this problem persist. It doesn't look like I am the only one either, as there are a couple of threads going on about this:

http://answers.unity3d.com/questions/989322/javascript-error-error-error-systemargumentexcepti.html

I am using 5.1 as well. Is there a solution for this?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Jul 09, 2015 at 09:19 AM 0
Share

Some more context:

  • What platform you build for?

  • What system you're working on?

  • Does that error come with a stacktrace and / or more details?

  • Have you checked the compiler directives in the project settings in Unity itself?

  • Does this happen even when you try to test your project in the editor or only when you try to build your project?

  • Since this seems to be a rare case, do you use any external libraries / uncommon namespaces / ...?

  • Can you actually start a new project and reproduce this error with some simple steps? If not, try to duplicate your project and start removing stuff to see when it's working again.

  • You said you removed those compiler symbols. Do you mean inside of $$anonymous$$onoDevelop / VisualStudio?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by meekrob · Sep 23, 2015 at 07:22 AM

I know this post is several months old, but it just started happening for me too after installing the Unity Test tools. My fix is similar but also temporary. I remove the duplicate DEBUG and TRACE terms inside of the Assembly-UnityScript.unitproj XML file. The duplicate terms are inside the <DefineConstants> element.

     <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
         <DebugSymbols>true</DebugSymbols>
         <DebugType>full</DebugType>
         <Optimize>false</Optimize>
         <OutputPath>Temp\bin\Debug\</OutputPath>
         <DefineConstants>DEBUG;TRACE;UNITY_5_1_1;UNITY_5_1;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_LICENSE;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_EDITOR_METRICS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;UNITY_ANDROID;UNITY_ANDROID_API;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_EGL;ENABLE_NETWORK;ENABLE_RUNTIME_GI;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_MONO;DEVELOPMENT_BUILD;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;
 UNITY_EDITOR_OSX</DefineConstants>
 ...
 </PropertyGroup>

After removing them, the compile error is resolved, but there are roughly 70+ warnings coming from the new package that only show up ONCE!

Then things are fine (no more warnings from the package) for the rest of the session.

I wish I had a better idea of the build process for C#, so that I might track this down. Alternatively, ONE of these packages (or ALL packages in general) should check the DEFINEs before they add to them.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Unhandled Exception: Mono.CSharp.InternalErrorException: Internal error 1 Answer

Unity wont launch 1 Answer

Compilation failed because the compiler couldn't be executed 1 Answer

How to fix Unity compiler error when building WP8.1 game? 2 Answers

Does Mono evaluate equality of objects differently then MS .NET 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges