提交 20d0c5ec 编写于 作者: B Brett Forsgren

Merge pull request #4960 from brettfo/xunit-x64-app-domain

work around a bug when running an analyzer test in 64-bit
......@@ -255,6 +255,13 @@ public class TestAnalyzer : DiagnosticAnalyzer
var analyzer = dir.CopyFile(typeof(DiagnosticAnalyzer).Assembly.Location);
var test = dir.CopyFile(typeof(FromFileLoader).Assembly.Location);
// The other app domain in 64-bit tries to load xunit.dll so to work around bug 4959
// (https://github.com/dotnet/roslyn/issues/4959) we are copying xunit to the test directory.
if (Environment.Is64BitProcess)
{
var xunit = dir.CopyFile(typeof(FactAttribute).Assembly.Location);
}
var analyzerCompilation = CSharp.CSharpCompilation.Create(
"MyAnalyzer",
new SyntaxTree[] { CSharp.SyntaxFactory.ParseSyntaxTree(analyzerSource) },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册