Skip to content

Commit ed5291a

Browse files
committed
Nuget - Non-SDK Projects when targeting AnyCPU delete CefSharp.Core.Runtime.dll
Nuget/Msbuild is copying the CefSharp.Core.Runtime.dll into the output folder as part of the build process (not sure which bitness it's actually copying). This breaks `AnyCPU` as the dll won't work when using Assembly.Resolve
1 parent 47cf10a commit ed5291a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

NuGet/CefSharp.Common.targets

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="CefSharpTransformXmlDllPath">
33

44
<!-- MSBuild is finding the dll within the package and copying it which is a problem for AnyCPU -->
5-
<Target Name="CefSharpDeleteCoreRuntimeAfterBuild" AfterTargets="AfterBuild" Condition="'$(PlatformTarget)' == 'AnyCPU' AND $(TargetFramework.StartsWith('net4'))">
5+
<Target Name="CefSharpDeleteCoreRuntimeAfterCopyFilesToOutputDirectory" AfterTargets="CopyFilesToOutputDirectory" Condition="'$(PlatformTarget)' == 'AnyCPU' AND ($(TargetFramework.StartsWith('net4')) OR $(TargetFrameworkVersion.StartsWith('v4.')))">
66
<Delete Files="$(OutDir)CefSharp.Core.Runtime.dll" />
77
<Delete Files="$(OutDir)CefSharp.Core.Runtime.pdb" />
88
<Delete Files="$(OutDir)CefSharp.Core.Runtime.xml" />
@@ -21,7 +21,9 @@
2121
<Message Importance="high" Text="CefSharpTargetDirAnyCpu32 = $(CefSharpTargetDirAnyCpu32)" />
2222
<Message Importance="high" Text="CefSharpTargetDirAnyCpu64 = $(CefSharpTargetDirAnyCpu64)" />
2323
<Message Importance="high" Text="RuntimeIdentifier = $(RuntimeIdentifier)" />
24-
<Message Importance="high" Text="TargetFramework = $(PlatformTarget)" />
24+
<Message Importance="high" Text="PlatformTarget = $(PlatformTarget)" />
25+
<Message Importance="high" Text="TargetFramework = $(TargetFramework)" />
26+
<Message Importance="high" Text="TargetFrameworkVersion = $(TargetFrameworkVersion)" />
2527
<Message Importance="high" Text="libcef.dll exists = $(OutDir)$(CefSharpTargetDir)libcef.dll" Condition="Exists('$(OutDir)$(CefSharpTargetDir)libcef.dll')" />
2628
<Message Importance="high" Text="libcef.dll exists AnyCPU(x86) = $(OutDir)$(CefSharpTargetDirAnyCpu32)libcef.dll" Condition="Exists('$(OutDir)$(CefSharpTargetDirAnyCpu32)libcef.dll')" />
2729
<Message Importance="high" Text="libcef.dll exists AnyCPU(x64) = $(OutDir)$(CefSharpTargetDirAnyCpu64)libcef.dll" Condition="Exists('$(OutDir)$(CefSharpTargetDirAnyCpu64)libcef.dll')" />

0 commit comments

Comments
 (0)