提交 942d2924 编写于 作者: L latkin

Use Assembly.EscapedCodeBase not .CodeBase in IDE unit tests

This was causing internal execution to fail when directory names
contained various special character.
上级 c2335c01
......@@ -1655,11 +1655,7 @@ module internal VsActual =
// copy this private assembly next to unit tests, otherwise assembly loader cannot find it
let neededLocalAssem = vsInstallDir + @"\PrivateAssemblies\Microsoft.VisualStudio.Platform.VSEditor.Interop.dll"
#if FX_ATLEAST_45
let curDir = System.IO.Path.GetDirectoryName((new System.Uri(System.Reflection.Assembly.Load("nunit.util").CodeBase)).LocalPath)
#else
let curDir = System.IO.Path.GetDirectoryName((new System.Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase)).LocalPath)
#endif
let curDir = System.IO.Path.GetDirectoryName((new System.Uri(System.Reflection.Assembly.Load("nunit.util").EscapedCodeBase)).LocalPath)
let localCopy = System.IO.Path.Combine(curDir, System.IO.Path.GetFileName(neededLocalAssem))
System.IO.File.Copy(neededLocalAssem, localCopy, true)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册