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:


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:

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

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 element.

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

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.