From db6e118cbc00a1c9766354701de3fedf0f4814d1 Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Fri, 10 Sep 2021 15:59:36 +1000 Subject: [PATCH] Nuget - Use PlatformTarget instead of CefSharpPlatformTarget for copy targets CefSharpPlatformTarget isn't defined on initial load --- NuGet/CefSharp.Common.targets | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/NuGet/CefSharp.Common.targets b/NuGet/CefSharp.Common.targets index a2b4826b9..d89b45c33 100644 --- a/NuGet/CefSharp.Common.targets +++ b/NuGet/CefSharp.Common.targets @@ -378,9 +378,12 @@ The None/Content entries aren't picked up as the .targets file doesn't exist before the Nuget restore (only when using packages.config) As a workaround we manually copy the files using a series of Targets and private itemgroup/propertygroups. Accessing the ItemGroups that exist in the .props files isn't possible, the Targets are handled differently by msbuild/VS2017/VS2019 (worked previous in VS2015) - so we duplicate the entries private to these tasks. Must be kept in sync with the .props files + so we duplicate the entries private to these tasks. Must be kept in sync with the .props files. + We cannot use any of the variables defined in this targets file as they won't have been loaded initially. + So we can only use PlatformTarget rather than CefSharpPlatformTarget, leaving the other CefSharp specific variables for now as + they can be user defined so will be loaded. --> - + $(TargetDir)$(CefSharpTargetDir) @@ -398,7 +401,7 @@ - + $(TargetDir)$(CefSharpTargetDir) @@ -417,7 +420,7 @@ - + $(TargetDir)$(CefSharpTargetDirAnyCpu32) $(TargetDir)$(CefSharpTargetDirAnyCpu64)