Open MatthieuMEZIL opened 3 years ago
As far as I can tell, this is not a change in Roslyn, but a change in Basic.Reference.Assemblies. For example, Basic.Reference.Assemblies 1.1.1, which targets Roslyn 3.8, returns null
for Net472.mscorlib.FilePath
, which is acceptable:
Whereas Basic.Reference.Assemblies 1.2.4 targets Roslyn 3.9 and returns "mscorlib.dll"
for Net472.mscorlib.FilePath
, which throws the exception:
Though I don't know if Roslyn should change here, or if Basic.Reference.Assemblies should.
cc: @jaredpar (author of Basic.Reference.Assemblies)
With the following code
With Net472.mscorlib coming from Basic.Reference.Assemblies, we got the following exception wityh Roslyn 3.10 and 3.11: “System.ArgumentException: 'Absolute path expected. Parameter name: path'” at Microsoft.CodeAnalysis.Scripting.Hosting.InteractiveAssemblyLoader.RegisterDependency(AssemblyIdentity dependency, String path) at Microsoft.CodeAnalysis.Scripting.ScriptBuilder.Build[T](Compilation compilation, DiagnosticBag diagnostics, Boolean emitDebugInformation, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.ScriptBuilder.CreateExecutor[T](ScriptCompiler compiler, Compilation compilation, Boolean emitDebugInformation, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.Script
1.GetExecutor(CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.Script
1.RunFromAsync(ScriptState previousState, Func2 catchException, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.Scripting.ScriptState.ContinueWithAsync[TResult](String code, ScriptOptions options, Func
2 catchException, CancellationToken cancellationToken)With Roslyn 3.8 it was working fine.