Upgrade to 96.0.142 (#142)

* Update to 96.0.140-pre

* Upgrade to 96.0.141

* Minor code cleanup
This commit is contained in:
Alex Maitland 2021-12-08 09:52:48 +10:00 committed by GitHub
parent a5d2bbe145
commit 841faea234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 57 additions and 66 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.props')" />
<Import Project="..\packages\cef.redist.x86.95.7.14\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.95.7.14\build\cef.redist.x86.props')" />
<Import Project="..\packages\cef.redist.x64.95.7.14\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.95.7.14\build\cef.redist.x64.props')" />
<Import Project="..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.props')" />
<Import Project="..\packages\cef.redist.x86.96.0.14\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.96.0.14\build\cef.redist.x86.props')" />
<Import Project="..\packages\cef.redist.x64.96.0.14\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.96.0.14\build\cef.redist.x64.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -88,16 +88,16 @@
<StartupObject>CefSharp.MinimalExample.OffScreen.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="CefSharp, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.95.7.141\lib\net452\CefSharp.dll</HintPath>
<Reference Include="CefSharp, Version=96.0.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.96.0.141\lib\net452\CefSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.Core, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.95.7.141\lib\net452\CefSharp.Core.dll</HintPath>
<Reference Include="CefSharp.Core, Version=96.0.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.96.0.141\lib\net452\CefSharp.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.OffScreen, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.OffScreen.95.7.141\lib\net452\CefSharp.OffScreen.dll</HintPath>
<Reference Include="CefSharp.OffScreen, Version=96.0.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.OffScreen.96.0.141\lib\net452\CefSharp.OffScreen.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@ -123,5 +123,5 @@
<Target Name="CefSharpAfterBuildDebug" AfterTargets="AfterBuild">
<CallTarget Targets="CefSharpAfterBuildDiagnostic" />
</Target>
<Import Project="..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.targets')" />
<Import Project="..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.targets')" />
</Project>

View File

@ -61,7 +61,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="CefSharp.OffScreen.NetCore" Version="95.7.141" />
<PackageReference Include="CefSharp.OffScreen.NetCore" Version="96.0.141" />
</ItemGroup>
<ItemGroup>

View File

@ -14,7 +14,7 @@ namespace CefSharp.MinimalExample.OffScreen
/// <summary>
/// CefSharp.OffScreen Minimal Example
/// </summary>
public class Program
public static class Program
{
/// <summary>
/// Asynchronous demo using CefSharp.OffScreen
@ -71,12 +71,12 @@ namespace CefSharp.MinimalExample.OffScreen
throw new Exception(string.Format("Page load failed with ErrorCode:{0}, HttpStatusCode:{1}", initialLoadResponse.ErrorCode, initialLoadResponse.HttpStatusCode));
}
var response = await browser.EvaluateScriptAsync("document.querySelector('[name=q]').value = 'CefSharp Was Here!'");
_ = await browser.EvaluateScriptAsync("document.querySelector('[name=q]').value = 'CefSharp Was Here!'");
//Give the browser a little time to render
await Task.Delay(500);
// Wait for the screenshot to be taken.
var bitmap = await browser.ScreenshotAsync();
var bitmapAsByteArray = await browser.CaptureScreenshotAsync();
// File path to save our screenshot e.g. C:\Users\{username}\Desktop\CefSharp screenshot.png
var screenshotPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "CefSharp screenshot.png");
@ -84,13 +84,7 @@ namespace CefSharp.MinimalExample.OffScreen
Console.WriteLine();
Console.WriteLine("Screenshot ready. Saving to {0}", screenshotPath);
// Save the Bitmap to the path.
// The image type is auto-detected via the ".png" extension.
bitmap.Save(screenshotPath);
// We no longer need the Bitmap.
// Dispose it to avoid keeping the memory alive. Especially important in 32-bit applications.
bitmap.Dispose();
File.WriteAllBytes(screenshotPath, bitmapAsByteArray);
Console.WriteLine("Screenshot saved. Launching your default image viewer...");
@ -172,7 +166,7 @@ namespace CefSharp.MinimalExample.OffScreen
//Give the browser a little time to render
Thread.Sleep(500);
// Wait for the screenshot to be taken.
var task = browser.ScreenshotAsync();
var task = browser.CaptureScreenshotAsync();
task.ContinueWith(x =>
{
// File path to save our screenshot e.g. C:\Users\{username}\Desktop\CefSharp screenshot.png
@ -181,13 +175,10 @@ namespace CefSharp.MinimalExample.OffScreen
Console.WriteLine();
Console.WriteLine("Screenshot ready. Saving to {0}", screenshotPath);
// Save the Bitmap to the path.
// The image type is auto-detected via the ".png" extension.
task.Result.Save(screenshotPath);
var bitmapAsByteArray = x.Result;
// We no longer need the Bitmap.
// Dispose it to avoid keeping the memory alive. Especially important in 32-bit applications.
task.Result.Dispose();
// Save the Bitmap to the path.
File.WriteAllBytes(screenshotPath, bitmapAsByteArray);
Console.WriteLine("Screenshot saved. Launching your default image viewer...");

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.redist.x64" version="95.7.14" targetFramework="net452" />
<package id="cef.redist.x86" version="95.7.14" targetFramework="net452" />
<package id="CefSharp.Common" version="95.7.141" targetFramework="net452" />
<package id="CefSharp.OffScreen" version="95.7.141" targetFramework="net452" />
<package id="cef.redist.x64" version="96.0.14" targetFramework="net452" />
<package id="cef.redist.x86" version="96.0.14" targetFramework="net452" />
<package id="CefSharp.Common" version="96.0.141" targetFramework="net452" />
<package id="CefSharp.OffScreen" version="96.0.141" targetFramework="net452" />
</packages>

View File

@ -16,7 +16,7 @@ namespace CefSharp.MinimalExample.WinForms
#else
private const string Build = "Release";
#endif
private string title = "CefSharp.MinimalExample.WinForms (" + Build + ")";
private readonly string title = "CefSharp.MinimalExample.WinForms (" + Build + ")";
private readonly ChromiumWebBrowser browser;
public BrowserForm()

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.props')" />
<Import Project="..\packages\cef.redist.x86.95.7.14\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.95.7.14\build\cef.redist.x86.props')" />
<Import Project="..\packages\cef.redist.x64.95.7.14\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.95.7.14\build\cef.redist.x64.props')" />
<Import Project="..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.props')" />
<Import Project="..\packages\cef.redist.x86.96.0.14\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.96.0.14\build\cef.redist.x86.props')" />
<Import Project="..\packages\cef.redist.x64.96.0.14\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.96.0.14\build\cef.redist.x64.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -72,16 +72,16 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="CefSharp, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.95.7.141\lib\net452\CefSharp.dll</HintPath>
<Reference Include="CefSharp, Version=96.0.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.96.0.141\lib\net452\CefSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.Core, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.95.7.141\lib\net452\CefSharp.Core.dll</HintPath>
<Reference Include="CefSharp.Core, Version=96.0.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.96.0.141\lib\net452\CefSharp.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.WinForms, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.WinForms.95.7.141\lib\net452\CefSharp.WinForms.dll</HintPath>
<Reference Include="CefSharp.WinForms, Version=96.0.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.WinForms.96.0.141\lib\net452\CefSharp.WinForms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@ -144,5 +144,5 @@
<Target Name="CefSharpAfterBuildDebug" AfterTargets="AfterBuild">
<CallTarget Targets="CefSharpAfterBuildDiagnostic" />
</Target>
<Import Project="..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.targets')" />
<Import Project="..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.targets')" />
</Project>

View File

@ -47,7 +47,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="CefSharp.WinForms" Version="95.7.141" />
<PackageReference Include="CefSharp.WinForms" Version="96.0.141" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk.WindowsDesktop" />

View File

@ -68,7 +68,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="CefSharp.WinForms.NetCore" Version="95.7.141" />
<PackageReference Include="CefSharp.WinForms.NetCore" Version="96.0.141" />
</ItemGroup>
<ItemGroup>

View File

@ -9,7 +9,7 @@ using System.Windows.Forms;
namespace CefSharp.MinimalExample.WinForms
{
public class Program
public static class Program
{
[STAThread]
public static int Main(string[] args)

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.redist.x64" version="95.7.14" targetFramework="net452" />
<package id="cef.redist.x86" version="95.7.14" targetFramework="net452" />
<package id="CefSharp.Common" version="95.7.141" targetFramework="net452" />
<package id="CefSharp.WinForms" version="95.7.141" targetFramework="net452" />
<package id="cef.redist.x64" version="96.0.14" targetFramework="net452" />
<package id="cef.redist.x86" version="96.0.14" targetFramework="net452" />
<package id="CefSharp.Common" version="96.0.141" targetFramework="net452" />
<package id="CefSharp.WinForms" version="96.0.141" targetFramework="net452" />
</packages>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.props')" />
<Import Project="..\packages\cef.redist.x86.95.7.14\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.95.7.14\build\cef.redist.x86.props')" />
<Import Project="..\packages\cef.redist.x64.95.7.14\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.95.7.14\build\cef.redist.x64.props')" />
<Import Project="..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.props')" />
<Import Project="..\packages\cef.redist.x86.96.0.14\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.96.0.14\build\cef.redist.x86.props')" />
<Import Project="..\packages\cef.redist.x64.96.0.14\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.96.0.14\build\cef.redist.x64.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -91,16 +91,16 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="CefSharp, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.95.7.141\lib\net452\CefSharp.dll</HintPath>
<Reference Include="CefSharp, Version=96.0.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.96.0.141\lib\net452\CefSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.Core, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.95.7.141\lib\net452\CefSharp.Core.dll</HintPath>
<Reference Include="CefSharp.Core, Version=96.0.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Common.96.0.141\lib\net452\CefSharp.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.Wpf, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Wpf.95.7.141\lib\net452\CefSharp.Wpf.dll</HintPath>
<Reference Include="CefSharp.Wpf, Version=96.0.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
<HintPath>..\packages\CefSharp.Wpf.96.0.141\lib\net452\CefSharp.Wpf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
@ -179,5 +179,5 @@
<Target Name="CefSharpAfterBuildDebug" AfterTargets="AfterBuild">
<CallTarget Targets="CefSharpAfterBuildDiagnostic" />
</Target>
<Import Project="..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.95.7.141\build\CefSharp.Common.targets')" />
<Import Project="..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.96.0.141\build\CefSharp.Common.targets')" />
</Project>

View File

@ -65,7 +65,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="CefSharp.Wpf.NetCore" Version="95.7.141" />
<PackageReference Include="CefSharp.Wpf.NetCore" Version="96.0.141" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.19" />
</ItemGroup>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.redist.x64" version="95.7.14" targetFramework="net452" />
<package id="cef.redist.x86" version="95.7.14" targetFramework="net452" />
<package id="CefSharp.Common" version="95.7.141" targetFramework="net452" />
<package id="CefSharp.Wpf" version="95.7.141" targetFramework="net452" />
<package id="cef.redist.x64" version="96.0.14" targetFramework="net452" />
<package id="cef.redist.x86" version="96.0.14" targetFramework="net452" />
<package id="CefSharp.Common" version="96.0.141" targetFramework="net452" />
<package id="CefSharp.Wpf" version="96.0.141" targetFramework="net452" />
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.19" targetFramework="net452" />
</packages>

View File

@ -1,4 +1,4 @@
SET cefsharpversion=95.7.141
SET cefsharpversion=96.0.141
..\nuget restore CefSharp.MinimalExample.sln