提交 ece7ae14 编写于 作者: K Kevin Pilch-Bisson

Use types instead of string munging

上级 34fa72b5
......@@ -328,14 +328,13 @@ private void OutputToOutputWindow(string message)
foreach (var reference in commandLineArguments.ResolveMetadataReferences(project.CurrentCompilationOptions.MetadataReferenceResolver))
{
// References that don't exist on disk will come back prepended with "Unresolved: ". We'll strip that off
// and still add them, so that if they appear, we'll load them (maybe they are outputs of other parts of the build).
const string unresolved = "Unresolved: ";
var path = reference.Display;
if (path.StartsWith(unresolved))
{
path = path.Substring(unresolved.Length);
}
// Some references may fail to be resolved - if they are, we'll still pass them
// through, in case they come into existence later (they may be built by other
// parts of the build system).
var unresolvedReference = reference as UnresolvedMetadataReference;
var path = unresolvedReference == null
? ((PortableExecutableReference)reference).FilePath
: unresolvedReference.Reference;
string possibleProjectReference;
if (targetPathsToProjectPaths.TryGetValue(path, out possibleProjectReference) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册