Build A.csproj in the below example.
EXPECTED: Build succeeds
ACTUAL:
C:\git\vstest\tools\dotnet\sdk\2.2.0-preview1-007460\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(165,5): Assets file 'C:\git\vstest\src\Microsoft.TestPlatform.CrossPlatEngine\obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v1.0'. Ensure that restore has run and that you have included 'netcoreapp1.0' in the TargetFrameworks for your project. [C:\git\vstest\src\Microsoft.TestPlatform.CrossPlatEngine\Microsoft.TestPlatform.CrossPlatEngine.csproj]
The duplicated ProjectReference appears to be interfering with the logic in _GetProjectReferenceTargetFrameworkProperties which is supposed to set SetTargetFramework on the AnnotatedProjects.
A.csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net46;netcoreapp1.0;netstandard1.4</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\B\B.csproj" />
<ProjectReference Include="..\B\B.csproj" />
</ItemGroup>
</Project>
B.csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net46;netstandard1.4</TargetFrameworks>
</PropertyGroup>
</Project>
Build
A.csprojin the below example.EXPECTED: Build succeeds
ACTUAL:
The duplicated
ProjectReferenceappears to be interfering with the logic in_GetProjectReferenceTargetFrameworkPropertieswhich is supposed to setSetTargetFrameworkon theAnnotatedProjects.A.csproj:B.csproj: