Skip to content

Commit 06c525a

Browse files
committed
Net Core - Exclude BrowserSubProcess from .Net 5.0 SingleFile/SelfContained builds
Issue #3407
1 parent 0cef482 commit 06c525a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

NuGet/PackageReference/CefSharp.Common.NETCore.targets

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<_CefSharpBrowserSubProcessRuntimeConfig>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\runtimes\$(RuntimeIdentifier)\native\CefSharp.BrowserSubprocess.runtimeconfig.json'))</_CefSharpBrowserSubProcessRuntimeConfig>
5+
<_CefSharpBrowserSubProcessExe>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\runtimes\$(RuntimeIdentifier)\native\CefSharp.BrowserSubprocess.exe'))</_CefSharpBrowserSubProcessExe>
6+
<_CefSharpBrowserSubProcessDll>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\runtimes\$(RuntimeIdentifier)\native\CefSharp.BrowserSubprocess.dll'))</_CefSharpBrowserSubProcessDll>
57
</PropertyGroup>
68

79
<!--
@@ -21,9 +23,16 @@
2123
</ItemGroup>
2224
</Target>
2325

24-
<Target Name="CefSharpExcludeBrowserSubprocessRuntimeConfigBeforeComputeFilesToBundle" BeforeTargets="_ComputeFilesToBundle" Condition="'$(RuntimeIdentifier)' != '' AND '$(SelfContained)' == 'true'">
26+
<!--
27+
For SelfContained and SingleFile under .Net 5 we don't include a default BrowserSubprocess
28+
SelfHosting of the BrowserSubprocess is required
29+
Issue https://github.com/cefsharp/CefSharp/issues/3407
30+
-->
31+
<Target Name="CefSharpExcludeBrowserSubprocessRuntimeConfigBeforeComputeFilesToBundle" BeforeTargets="_ComputeFilesToBundle" Condition="'$(_TargetFrameworkVersionWithoutV)' >= '5.0' AND '$(RuntimeIdentifier)' != '' AND '$(SelfContained)' == 'true'">
2532
<ItemGroup>
2633
<ResolvedFileToPublish Remove="$(_CefSharpBrowserSubProcessRuntimeConfig)" />
34+
<ResolvedFileToPublish Remove="$(_CefSharpBrowserSubProcessExe)" />
35+
<ResolvedFileToPublish Remove="$(_CefSharpBrowserSubProcessDll)" />
2736
</ItemGroup>
2837
</Target>
2938

0 commit comments

Comments
 (0)