Open xen2 opened 5 years ago
I could fix the problem with this kind of target:
<Target Name="_XenkoRemoveRuntimeIdentifierFromSolutionDependencies" AfterTargets="AssignProjectConfiguration">
<ItemGroup>
<ProjectReferenceWithConfiguration Condition="'%(ProjectReferenceWithConfiguration.ReferenceSourceTarget)' != 'ProjectReference'">
<GlobalPropertiesToRemove>%(ProjectReferenceWithConfiguration.GlobalPropertiesToRemove);RuntimeIdentifier</GlobalPropertiesToRemove>
</ProjectReferenceWithConfiguration>
</ItemGroup>
</Target>
Can you please submit a PR with the fix?
I have a project with multiple
RuntimeIdentifiers
and it fails to build a solution reference which doesn't have aRuntimeIdentifier
.Error is
I think what it needs is to have
RuntimeIdentifier
in theProjectReferenceWithConfiguration.GlobalPropertiesToRemove
:MSBuild code reference (where
TargetFramework
is hardcoded): https://github.com/Microsoft/msbuild/blob/e77fa08888dbf7d6478b7659aeaccc39ce04c435/src/Tasks/ResolveProjectBase.cs#L280