What is "The imported type `System.Xml.Linq.XElement' is defined multiple times"?

Hello. I got issue from Compile log “The imported type `System.Xml.Linq.XElement’ is defined multiple times” on Unity3D
Version 4.2.0f4 and development env Visual studio 2012. Codes are like this.

using System.Linq; using System.Xml; using System.Xml.XPath; using System.Xml.Linq; using System; using System.Text.RegularExpressions; using System.IO;

public class XmlLoad : MonoBehaviour
{
static Dictionary<XmlOperator.XmlType, XElement> xmlDictionary
= new Dictionary<XmlOperator.XmlType, XElement>(); //<<<<–Here is location to occur error “Multiple define XElement …”

}

How to fix it? I need any involved solution. Thanks.

Sounds like you may have a reference imported that you shouldn’t, maybe two different versions of .NET. What this error message generally means is that you have two assemblies that have System.Xml.Linq.XElement defined in them and the compiler doesn’t know which one to use.

Edit: Have you added any DLL files to your project?

[solved] Dustin Horne" As you mentioned my Unity3D project plugin folder got “System.Xml.Linq.dll” so overlapped same two assemblies. Deleted one It just solved. Thank you.