Cross targeted project with different targetframeworks fail to load MetadataReferences
jeromelaban opened this issue · 2 comments
jeromelaban commented
Version Used:
VS15.4
Steps to Reproduce:
- Create an empty solution
- Create a project named A with
<TargetFrameworks>net46;netstandard1.0</TargetFrameworks>
- Create project named B with
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
- Make the B project reference A
- With Roslyn workspace APIs do the following:
var props = new Dictionary<string, string>() { { "TargetFramework", "netstandard2.0" } };
var ws = MSBuildWorkspace.Create(props);
var project = await ws.OpenProjectAsync("B.csproj");
Expected Behavior:
The project.MetadataReferences
member contains valid references.
Actual Behavior:
The project.MetadataReferences
member is empty.
The loaded project B will be in a inconsistent state, as MSBuildWorkspace will try to load the A project using netstandard2.0, which it does not support.
jinujoseph commented
artiomchi commented
Oh wow, has this not been looked at since January? I'm running into the same issue, and it looks like there just isn't a solution for this.
Can we get some help on this one please?