string toolsVersion;
public string ToolsVersion {
- get { return toolsVersion ?? "4.0"; }
+ get { return toolsVersion ?? string.Empty; }
set { toolsVersion = value; }
}
ProjectRootElement (ProjectCollection projectCollection)
{
+ ToolsVersion = "4.0";
}
public static ProjectRootElement Create ()
public static ProjectRootElement Create (XmlReader xmlReader, ProjectCollection projectCollection)
{
var result = Create (projectCollection);
+ result.ToolsVersion = null;
result.Load (xmlReader);
return result;
}
public void Save ()
{
+ if (FullPath == null)
+ throw new InvalidOperationException ("This project was not given the file path to write to.");
Save (Encoding);
}
AppendChild (def);
return def;
case "UsingTask":
- return AddUsingTask (null, null, null);
+ var ut = AddUsingTask (null, null, null);
+ return ut;
case "Choose":
var choose = CreateChooseElement ();
AppendChild (choose);