try
{
list = from XElement e in d.Descendants(wix + "File")
where e.Attribute("Name").Value.Contains(temp.Name) &&
e.Parent.Parent.Attribute("Name").Value.Contains(temp.Directory.Name)
select e;
}
catch (NullReferenceException e)
{
MessageBox.Show(e.Message);
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
now my question is why does this code produce a run time error saying I have a NullReferenceException unhandled. If you need more information about the program let me know.
EDIT: The debugger points to the "where" part of the linq statement. When I run this program direct from the exe file I still get the exception.