I have a Class Library, let's call it BO, that is set for multi-targeted frameworks.
<TargetFrameworks>net40;net5.0</TargetFrameworks>
This "BO" has a net5.0 Projects Dependency / Reference to another Class Library, let's call it DA, that is .NET 5.0 only.
When I build the BO project, it does not build the DA project.
I have to first manually build the DA project and I can then build the BO project.
If I remove the multi-target "net40" from the BO, then the DA will build when I build the BO.
Am I missing something or is this a Visual Studio bug?
Here is the BO and DA project files.
BO
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net40;net5.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Deterministic>false</Deterministic>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<ProjectReference Include="..\DA.csproj" />
</ItemGroup>
</Project>
DA
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.8" />
</ItemGroup>
</Project>