Open yhvicey opened 3 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
It looks like you're package reference is conditioned on netstandard2.0 but the child project is not targeting netstandard2.1, so I would expect that this is the cause. If not, can you provide a binlog reproducing the issue?
With SetTargetFramework I assume Primary.Child.csproj (net472)
should be referencing Primary.csproj (netstandard2.0)
? As net472
implemented netstandard2.0
, will PackageReference
be referenced in child project in such case?
Attached with a repro-able example as well as its binlog: Repro.zip
@yhvicey Any available solution now? In my case in dotnet/msbuild#8405, Main project do reference the output assembly of correct TFM from Child project, but the files that are copied to local are faulty. I think crew members fixed the reference bug but other tasks in MSBuild were not changed compatibly.
To supplement the info from @sanmuru - the SetTargetFramework="TargetFramework=netstandard2.0"
seems to be ignored completely, the conditioned PackageReferences
lead to identical packages resolution within project.asset.json
for the root project regardless of the SetTargetFramework
presence and its value.
This falls into scope of nuget - opening issue there: https://github.com/NuGet/Home/issues/12436
Imaging there're two projects,
Primary
andPrimary.Child
:And
Microsoft.CSharp
package (and its assemblies) is not being referenced when buildingPrimary.Child.csproj (net472)
referencingPrimary.csproj (netstandard2.0)
: