提交 d49f36f2 编写于 作者: C CyrusNajmabadi

Switch to Uri.TryCreate.

上级 c3c00a1d
......@@ -55,7 +55,11 @@ public string ResolveAssemblyPath(ProjectId projectId, string assemblyName)
// Codebase specifies where the assembly is on disk. However, it's in
// full URI format (i.e. file://c:/...). This will allow us to get the
// actual local in the normal path format.
return new Uri(assembly.CodeBase).LocalPath;
Uri uri;
if (Uri.TryCreate(assembly.CodeBase, UriKind.RelativeOrAbsolute, out uri))
{
return uri.LocalPath;
}
}
catch (InvalidOperationException)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册