You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AnyCpu - Add ModuleInitializer to resolve AnyCpu dlls at runtime
- Checks if the Assembly.GetEntryAssembly() is MSIL
- Change CefSharp.Core.csproj to use LangVersion 9 so we can get the compiler to output
the ModuleInitializer
- Remove CefSharpPlatformCheck and other CefSharpAnyCpuSupport checks
- CefSharp.Common.targets still has CefSharpAnyCpuSupport references for backwards compatibility with those with it set and Prefer32bit
The default behaviour for this case is to simply copy the 32bit libs
- Calling CefRuntime.SubscribeAnyCpuAssemblyResolver multiple times now will simply Unsubscribe the previous resolver
This change should remove the need for users to perform any action when supporting AnyCpu.
<CefSharpAnyCpuSupportCondition="'$(CefSharpAnyCpuSupport)' != 'true' AND '$(NuGetProjectStyle)' == 'PackageReference' AND $(NuGetToolVersion) > '5.0' AND '$(OutputType)' == 'Library'">true</CefSharpAnyCpuSupport>
151
141
</PropertyGroup>
152
142
153
143
<Choose>
@@ -359,20 +349,17 @@
359
349
</Choose>
360
350
361
351
<!--
352
+
This Transform is no longer used by default, the project was changed to use a ModuleInitializer to resolve the references
353
+
at runtime. The transform remains here for anyone wishing to manually call
362
354
For AnyCPU we use a Transform to add entries to app.config if possible
363
-
Otherwise throw error to alert user they need to perform additional action
364
355
-->
365
356
<UsingTaskTaskName="TransformXml"AssemblyFile="$(CefSharpTransformXmlDllPath)"Condition="Exists('$(CefSharpTransformXmlDllPath)') AND '$(CefSharpPlatformTarget)' == 'AnyCPU' AND '$(CefSharpAnyCpuSupport)' == '' AND '$(CefSharpBuildAction)' != 'NoAction'" />
366
357
367
-
<TargetName="CefSharpCommonAnyCPUConfigTransform"AfterTargets="_CopyAppConfigFile"Condition="'@(AppConfigWithTargetPath)' != '' AND Exists('$(CefSharpTransformXmlDllPath)') AND '$(CefSharpPlatformTarget)' == 'AnyCPU' AND '$(CefSharpAnyCpuSupport)' == '' AND '$(CefSharpBuildAction)' != 'NoAction'">
<TargetName="CefSharpPlatformCheck"BeforeTargets="ResolveAssemblyReferences"Condition="('@(AppConfigWithTargetPath)' == '' OR !Exists('$(CefSharpTransformXmlDllPath)')) AND '$(CefSharpPlatformTarget)' == 'AnyCPU' AND '$(CefSharpAnyCpuSupport)' != 'true' AND '$(CefSharpBuildAction)' != 'NoAction'">
373
-
<ErrorText="$(MSBuildThisFileName) is unable to proceeed as your current PlatformTarget is '$(CefSharpPlatformTarget)'. To target AnyCPU please read https://github.com/cefsharp/CefSharp/issues/1714. Alternatively change your PlatformTarget to x86 or x64 and the relevant files will be copied automatically."HelpKeyword="CefSharpSolutionPlatformCheck" />
0 commit comments