From 183132bae1c5937d936282f05a35cc2df7e5881f Mon Sep 17 00:00:00 2001 From: Alex Maitland Date: Sat, 6 Mar 2021 13:37:01 +1000 Subject: [PATCH] Nuget - Default CefSharpBuildAction to NoAction when Library project PackageRef Nuget > 5.0 - NoAction should now disable AnyCPU checks - Default to NoAction when Library and Nuget 5.0 when using PackageReference, the Transitive references should flow through to the consuming projects. --- NuGet/CefSharp.Common.targets | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/NuGet/CefSharp.Common.targets b/NuGet/CefSharp.Common.targets index 61ab4e86b..d541a75d6 100644 --- a/NuGet/CefSharp.Common.targets +++ b/NuGet/CefSharp.Common.targets @@ -85,10 +85,15 @@ None is the default (same as selecting the None Build Action in Visual Studio) for Nuget packages.config Content is the default (same as selecting the None Build Action in Visual Studio) for Nuget PackageReference Technically the older Non-SDK Style project can use PackageReference under VS2019 (possibly VS2017 as well), - so we use NuGetProjectStyle which is defined in the .nuget.g.props file for projects using PackageReference + so we use NuGetProjectStyle which is defined in the .nuget.g.props file for projects using PackageReference. + For Library projects with Nuget supports buildTransitive we don't include our additional files and packages, the transitive reference should flow directly to the consuming projects. + For class libraries that are often AnyCPU and consuming Exe/WinExe projects that are x64 or x86 the resuiling build output + is polluted with extra copies in sub folders. --> None Content + NoAction + $(CefSharpTargetDir)\ @@ -331,14 +336,14 @@ For AnyCPU we use a Transform to add entries to app.config if possible Otherwise throw error to alert user they need to perform additional action --> - + - + - +