mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
5a3b259b2d
Still a bit of a hack, at least it will use the win32 dll if the x64 doesn't exist Issue #3197
68 lines
3.0 KiB
XML
68 lines
3.0 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<PropertyGroup>
|
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
|
<RootNamespace>CefSharp.Core</RootNamespace>
|
|
<AssemblyName>CefSharp.Core</AssemblyName>
|
|
<DocumentationFile>$(BaseOutputPath)$(PlatformTarget)\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
|
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
|
<SignAssembly>true</SignAssembly>
|
|
<AssemblyOriginatorKeyFile>..\CefSharp.snk</AssemblyOriginatorKeyFile>
|
|
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
<NoWarn>CS1591,CS0436</NoWarn>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\CefSharp\CefSharp.netcore.csproj">
|
|
<Private>false</Private>
|
|
</ProjectReference>
|
|
<ProjectReference Include="..\CefSharp.Core\CefSharp.Core.netcore.vcxproj">
|
|
<Private>false</Private>
|
|
</ProjectReference>
|
|
</ItemGroup>
|
|
|
|
<!-- GenApi -->
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20374.3" GeneratePathProperty="true" />
|
|
</ItemGroup>
|
|
|
|
<!--
|
|
Ugly hack to make sure we have an assembly to use as our source dll for GenAPI
|
|
If the x64 version exists we'll use that, otherwise we'll use the win32
|
|
Haven't found a nice way to determine the Platform (resolves as AnyCPU)
|
|
-->
|
|
<Choose>
|
|
<When Condition="Exists('$(SolutionDir)CefSharp.Core\bin.netcore\x64\$(Configuration)\CefSharp.Core.dll')">
|
|
<PropertyGroup>
|
|
<IntermediateTargetPath>$(SolutionDir)CefSharp.Core\bin.netcore\x64\$(Configuration)\CefSharp.Core.dll</IntermediateTargetPath>
|
|
</PropertyGroup>
|
|
</When>
|
|
<Otherwise>
|
|
<PropertyGroup>
|
|
<IntermediateTargetPath>$(SolutionDir)CefSharp.Core\bin.netcore\win32\$(Configuration)\CefSharp.Core.dll</IntermediateTargetPath>
|
|
</PropertyGroup>
|
|
</Otherwise>
|
|
</Choose>
|
|
<PropertyGroup>
|
|
<GenerateReferenceAssemblySource>false</GenerateReferenceAssemblySource>
|
|
<GenAPITargetDir>$(ProjectDir)</GenAPITargetDir>
|
|
<GenAPITargetPath>$(GenAPITargetDir)$(AssemblyName).cs</GenAPITargetPath>
|
|
</PropertyGroup>
|
|
|
|
<!--
|
|
Call GenApi before we compile as to generate the source which is then used
|
|
to by this project to generate the dll
|
|
-->
|
|
<Target Name="GenApiBeforeCompile" BeforeTargets="Compile">
|
|
<Message Text="BeforeCompile" Importance="high" />
|
|
|
|
<CallTarget Targets="GenerateReferenceAssemblySource"/>
|
|
|
|
<!--
|
|
GenApi generates our VC++ dispose/finalise methods are public sealed override void Dispose()
|
|
which won't compile, this just replaces that with public void Dispose
|
|
-->
|
|
|
|
<WriteLinesToFile File="$(GenAPITargetPath)" Lines="$([System.IO.File]::ReadAllText($(GenAPITargetPath)).Replace('public sealed override void Dispose()','public void Dispose()'))" Overwrite="true" Encoding="utf-8" />
|
|
</Target>
|
|
</Project>
|