Skip to content

Commit

Permalink
ConsistencyCheck: Ensure mscorlib is added to the compilation (MSBuil…
Browse files Browse the repository at this point in the history
…d doesn't return it for .NET 2.0 projects like IKVM)
  • Loading branch information
dgrunwald committed Jun 27, 2014
1 parent d68853d commit ebe00cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ICSharpCode.NRefactory.ConsistencyCheck/CSharpProject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ IEnumerable<string> ResolveAssemblyReferences(Microsoft.Build.Evaluation.Project
projectInstance.Build("ResolveAssemblyReferences", new [] { new ConsoleLogger(LoggerVerbosity.Minimal) });
var items = projectInstance.GetItems("_ResolveAssemblyReferenceResolvedFiles");
string baseDirectory = Path.GetDirectoryName(this.FileName);
return items.Select(i => Path.Combine(baseDirectory, i.GetMetadataValue("Identity")));
var result = items.Select(i => Path.Combine(baseDirectory, i.GetMetadataValue("Identity"))).ToList();
if (!result.Any(t => t.Contains("mscorlib") || t.Contains("System.Runtime")))
result.Add(typeof(object).Assembly.Location);
return result;
}

static bool? GetBoolProperty(Microsoft.Build.Evaluation.Project p, string propertyName)
Expand Down

0 comments on commit ebe00cc

Please sign in to comment.