Repro steps:
- Create a new Visual Basic console application targeting
netcoreapp3.1
- Set
<VBRuntime>Embed</VBRuntime>
- Build and generate a binary log
The expectation here is that Microsoft.VisualBasic is not passed as a reference to the compilation. The actual behavior is that it is passed as a reference. Notice also if you change the target framework to netcoreapp2.1 or netstandard2.0 it is not passed as a reference.
This is making it hard to multi-target the Visual Basic compiler because our code is written with the expectation that the real runtime is not provided as a reference.
Related: dotnet/roslyn#40766