Skip to content

Commit

Permalink
Nuget - Add CefSharp.Core.Runtime reference when TargetFramework = Ne…
Browse files Browse the repository at this point in the history
…tCore
  • Loading branch information
amaitland committed Dec 9, 2020
1 parent ee05ef2 commit 5d4cd24
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
6 changes: 3 additions & 3 deletions NuGet/CefSharp.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<CefSharpCommonBinaries32 Include="$(MSBuildThisFileDirectory)..\CefSharp\x86\*.*" />
<CefSharpCommonBinaries64 Include="$(MSBuildThisFileDirectory)..\CefSharp\x64\*.*" />
<CefSharpCommonBinariesAnyCPU Include="$(MSBuildThisFileDirectory)..\CefSharp\**\*.*" />
<CefSharpCommonManagedDlls Include="$(MSBuildThisFileDirectory)..\lib\net452\**\*.*" />
<CefSharpCommonTransform32 Include="$(MSBuildThisFileDirectory)app.config.x86.transform"/>
<CefSharpCommonTransform64 Include="$(MSBuildThisFileDirectory)app.config.x64.transform"/>
<CefSharpCommonManagedDlls Include="$(MSBuildThisFileDirectory)..\lib\net452\**\*.*" />
<CefSharpCommonTransform32 Include="$(MSBuildThisFileDirectory)app.config.x86.transform"/>
<CefSharpCommonTransform64 Include="$(MSBuildThisFileDirectory)app.config.x64.transform"/>

<CefSharpBrowserProcessCore32 Include="$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.BrowserSubprocess.Core.dll" />
<CefSharpBrowserProcessCore64 Include="$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.BrowserSubprocess.Core.dll" />
Expand Down
21 changes: 21 additions & 0 deletions NuGet/CefSharp.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,27 @@
</Otherwise>
</Choose>

<!-- For Net Core 3.x we include a Reference to CefSharp.Core.Runtime so it's included in the .deps.json file -->
<Choose>
<When Condition="'$(PlatformTarget)' == 'x64' AND $(TargetFramework.StartsWith('netcoreapp3'))">
<ItemGroup>
<Reference Include="CefSharp.Core.Runtime">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Core.Runtime.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
</When>
<!-- x86, Win32 and AnyCPU -->
<When Condition="('$(PlatformTarget)' == 'x86' OR '$(PlatformTarget)' == 'Win32') AND $(TargetFramework.StartsWith('netcoreapp3'))">
<ItemGroup>
<Reference Include="CefSharp.Core.Runtime">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Core.Runtime.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
</When>
</Choose>

<!--
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
Expand Down

0 comments on commit 5d4cd24

Please sign in to comment.