提交 3b06d826 编写于 作者: T Tomas Matousek

Temporarily add System.Runtime facade reference explicitly, since the host...

Temporarily add System.Runtime facade reference explicitly, since the host object moved to portable lib
上级 fd6d108f
......@@ -841,11 +841,15 @@ public void ReferencePaths()
CompileLibrary(directory, assemblyName + ".dll", assemblyName, @"public class C { }");
var rspFile = Temp.CreateFile();
rspFile.WriteAllText("/rp:" + directory.Path);
var task = Host.ResetAsync(new InteractiveHostOptions(initializationFile: rspFile.Path, culture: CultureInfo.InvariantCulture));
task.Wait();
Host.ResetAsync(new InteractiveHostOptions(initializationFile: rspFile.Path, culture: CultureInfo.InvariantCulture)).Wait();
Execute(
$@"#r ""{assemblyName}.dll""
typeof(C).Assembly.GetName()");
Assert.Equal("", ReadErrorOutputToEnd());
var output = SplitLines(ReadOutputToEnd());
Assert.Equal(2, output.Length);
Assert.Equal("Loading context from '" + Path.GetFileName(rspFile.Path) + "'.", output[0]);
......
......@@ -199,6 +199,12 @@ public Compilation GetCompilation()
{
var globalsTypeAssembly = MetadataReference.CreateFromAssemblyInternal(GlobalsType.GetTypeInfo().Assembly);
references.Add(globalsTypeAssembly);
// TODO: remove
var systemRuntimeFacade = MetadataReference.CreateFromAssemblyInternal(
Assembly.Load(new AssemblyName("System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")));
references.Add(systemRuntimeFacade);
}
if (languageRuntimeReferenceOpt != null)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册