Hi all,
The following code :
using System;
using System.IO;
using System.Xml;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Linq;
namespace AlmaRestTest
{
class MainClass
{
public static void Main (string[] args)
{
XElement root = XElement.Load("TestConfig.xml");
IEnumerable<XElement> tests =
from el in root.Elements("Test")
where (string)el.Element("CommandLine") == "Examp2.EXE"
select el;
foreach (XElement el in tests)
Console.WriteLine((string)el.Attribute("TestId"));
Console.ReadLine();
}
}
}
get the following error :
Assets/NewBehaviourScript.cs(4,18): error CS0234: The type or namespace name `Linq' does not exist in the namespace `System.Xml'. Are you missing an assembly reference?
So whats wrong here ? - I can add a reference to System.Xml.Linq, but either unity deletes it or gives the error. I can still see things XElement in MonoDevelop in IntelliSense after adding the reference but it still fails when I return to Unity?!