From 205f47739f98e3d2fced20330a76b03a21ce14cc Mon Sep 17 00:00:00 2001 From: Manodasan Wignarajah Date: Sun, 16 Jun 2024 17:48:15 -0700 Subject: [PATCH] Fix issues with authoring targets related to regular C# libraries being associated with winmds due to being a dependency of an authoring project and fixing issue where multiples references of the same file are not handled such that the latest is chosen. --- ...Microsoft.Windows.CsWinRT.Authoring.targets | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/nuget/Microsoft.Windows.CsWinRT.Authoring.targets b/nuget/Microsoft.Windows.CsWinRT.Authoring.targets index df227df2b..fcf3bd0a4 100644 --- a/nuget/Microsoft.Windows.CsWinRT.Authoring.targets +++ b/nuget/Microsoft.Windows.CsWinRT.Authoring.targets @@ -79,16 +79,20 @@ Copyright (C) Microsoft Corporation. All rights reserved. + in by a referencing C++ app, so we manually set them to be copied here. + We depend on ResolveAssemblyReferences to make sure any duplicate references of + different versions are resolved to the latest version. + --> + Condition="'%(ReferenceCopyLocalPaths.AssetType)' == 'runtime' or '%(ReferenceCopyLocalPaths.CopyLocal)' == 'true'"> %(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension) PreserveNewest @@ -137,13 +141,6 @@ Copyright (C) Microsoft Corporation. All rights reserved. - - - %(FullPath) - PreserveNewest - - - @@ -154,13 +151,12 @@ Copyright (C) Microsoft Corporation. All rights reserved. true - %(CsWinRTComponent_ManagedImplementation.TargetPath) + $(TargetDir)$(AssemblyName).dll winmd true true true -