- After switching to the Chrome bootstrap, the browser wouldn't load if you passed in an empty
string to the constructor, we can defer loading until after another LoadUrl call is made.
Resolves#4832
- GetAuthCredentials won't be called otherwise, those wishing to use the Chrome password
prompt can remove the command line arg at runtime.
Resolves#4830
- Potentially the call to the Stop/Start the Timer in the Paint event handler
may result in an ObjectDisposedException as the Timer was disposed on a different thread.
Resolves#4597
* Ensure reference assemblies are copied to output folders
The .NET 6.0 SDK introduced a breaking change meaning that reference
assemblies are no longer automatically copied from the intermediate
build directory to the output directory. An additional MsBuild property
is now required.
* Specify VS2022 for reference assembly copy condition
---------
Co-authored-by: Bernard Mason <bernard.mason@thinksmartbox.com>
* Upgrade minimum .Net version to 4.6.2
#4433
* Use TaskCreationOptions.RunContinuationsAsynchronously
- Now that min version is .Net 4.6.2 we can use RunContinuationsAsynchronously
- Remove some unused code
- Instead of assigning RenderHandler directly in the constructor, only assign when
the new instance in ScreenshotOrNull. Avoid allocating the buffer for those
using the new CaptureScreenshotAsync method.
* WPF/OffScreen - Add WaitForRenderIdleAsync
- Task resolves when render has been idle for the specified time
- Make TaskTimeoutExtensions public (they're not extension methods as this was expected)
- Previously when no Scale was specified, then the previous ChromiumWebBrowser scale was used.
- Now Viewport defaults to a scale of 1, so the behaviour has been changed so the scale passed as
the param is always used.
- Test updated
This is a minor breaking change.
Resolves#4091
- Simplification of calling the DevTools method
- Moved GetContentSizeAsync from OffScreen into partial class (now accessible from WinForms/WPF/OffScreen).
- Added menu option
Resolves#4081
* OffScreen - Fix ResizeAsync with deviceScalingFactor
* OffScreen - Fix CaptureScreenshotAsync Width / Height calculation to include X and Y
Always apply Scale changes
- Add IChromiumWebBrowserBase which is can be used for ChromiumWebBrowser instances and ChromiumHostControl
- Reduce code duplication for extensions methods
- Update WinForms Example
- Initial intention was to have a reusable method that could be used CefSharp.Wpf.HwndHost,
upon further deliberation I've decided to build the functionality into the ChromiumWebBrowser.Partial.cs
and will need to duplicate the functionality in CefSharp.Wpf.HwndHost. This guarantees that the
Task will be resolved in all cases. The previous implementation there was a theoretical change we'd
miss subscribing to the relevant events
- Remove CancellationToken as it's not possible to cancel
Issue #3842
- GlobalContextInitialized wraps a TaskCompletionSource which is resolved
when the Global CefRequestContext has been created
- Reduce code duplication
If successful we can apply the same changes to WinForms/WPF though they're less likely to have
issues than the OffScreen implementation as the CreateBrowser doesn't happen until much later
Issue #3850#3634
- All three implementations updated to include an IsDisposed check which
will simply return immediately
- OffScreen updated to match the WinForms behaviour
- WPF is more complex because of the initialAddress and Address properties
initialAddress will be set if the browser hasn't been created, if the browserCreated
has been created and OnAfterBrowserCreated hasn't been called then we'll set the Address
dependency property.
NOTE: For WinForms/OffScreen there's a small window
here between CreateBrowser and OnAfterBrowserCreated
where the Address prop will be updated, though LoadUrl
won't be called.
This was added as a workaround for Issue #3715 which is specific to WinForms
and will hopefully be fixed upstream.
I've added the logic to all three implementations as I think the behaviour should be
consistent across all implementations.
- The Debug PDBs will now use SourceLink
- The C++/CLI projects will use SourceLink
- CefSharp.Core.dll now generates/uses a ref assembly
- The managed (c#) projects still embed sources/symbols for Release builds
At some point we should investigate generating a snupkg to reduce the dll size
As the browser is Disposed on a different Thread to OnAfterBrowserCreated is called there's possibility of an ObjectDisposedException.
Instead of locking just catch and ignore the error as it's extremely rare
Resolves#3437
* Net Core - Rename CefSharp.Core.dll to CefSharp.Core.Runtime.dll
Partial rename, only Net Core, folder not renamed
* Net Core - Rename CefSharp.Core.RefAssembly to CefSharp.Core.netcore
Remove GenApi
* Core - Rename CefDragDataWrapper to DragData
Move into CefSharp.Core namespace
* WinForms/WPF/OffScreen - Migrate from GitLink command line to Nuget package
* Net Core - Refactor to have CefSharp.Core.dll contain only public Api
* Net Core - Remove CefSharp.Core.RefAssembly
* Net Core - Change CefSharp.Core.netcore output folder
* Net Core - Restructure nuget packages
* Net Core - Add Cefsharp.Core.Runtime.RefAssembly
* Net Core - Hide CLI/C++ classes from intellisense
Make sure users don't attempt to load them directly
* Rename CefSharp.Core to CefSharp.Core.Runtime
* Core - Restructure Net 4.5.2 packages to use CefSharp.Core.dll anycpu variant
Attempt to load CefSharp.Core.Runtime at runtime rather than having to use msbuild to copy the correct version
* Rename CefSharp.Core.netcore to CefSharp.Core
* WPF/WinForms/OffScreen - Change from x86/64 to AnyCPU
As they are all managed assemblies they can target AnyCPU.
Includes CefSharp.dll
* Convert RequestContextBuilder from C++ to C#
Now part of the CefSharp.Core PublicApi
* Update version number to 87.1.11
* Migrate more of the public Api to C#
* Net Core - Basic restructure complete
* Net Core - ModuleInitializer (Doesn't work yet)
* Remove direct references to BrowserSettings
* Net Core - ModuleInitializer load CefShar.Core.Runtime.dl
* Net Core - Load libcef.dll via CLR Module initializer
If no RID is specified then we can load libcef.dll using the module initializer
* Add version to CefSharp.Core
* Remove dependency on CefSharp.Core.Runtime
Rewrite common targets
* AnyCPU app.config transform
Improve AnyCPU support
* Improve Net Core 3 support
Only delete CefSharp.Core.Runtime.dll when AnyCPU
* Nuget - Add CefSharp.Core.Runtime reference when TargetFramework = NetCore
* Fix Typos
Based on #3306
* Net Core - Rename CefSharp.Core.Runtime RefAssembly source file
* Net Full - Generate CefSharp.Core.Runtime Ref Assembly
For now the powershell build script generates the .cs file based on a x86 release build.ps1
It's not possible to directly install GenApi as it requires a Sdk style project
* Net Core - Old packages copy files to required folders
* Test - Install newer .Net Compiler and set Lang Version to 7.3
* Net Core - Exclude Net 452 Runtime generated reference source
* Core - Add Refactoring TODO
* Ref Assembly - Generate source as part of build
- Move ref assembly source generate into GenerateRefAssemblySource.ps1
- Call before project build
Runs locally, see if Appveyor has a problem with the powershell script execution
* Core - Add more factory methods to create instances of managed wrappers
* Net Core - Make Initialzier properties internal
Not quite sure what the public API should look like as yet, so making internal for now.
When building CefSharp3.sln under VS2019 the Microsoft.Net.Compilers (version 2.4) is passed version 7.3 for c# version
Version 2.4 supports a maximum of version 7.1, the issue doesn't happen on VS2015 or VS2017
Hard code LangVersion in csproj files
CS1617 Invalid option '7.3' for /langversion; must be ISO-1, ISO-2, Default, Latest or a valid version in range 1 to 7.1.
https://stackoverflow.com/questions/46419760/using-c-sharp-7-1-with-msbuild
Only for Release builds.
This appears to work as expected under VS2017, not sure about VS2015
Roslny .Net compiler upgraded to 2.4 allows for Ref Assembly generation
- Add InternalIsBrowserInitialized to partial class
- Move ThrowExceptionIfDisposed/ThrowExceptionIfBrowserNotInitialized to partial class
- Remove checks from DevToolsExtensions.ExecuteDevToolsMethodAsync as the checks were already in GetBrowser
In WPF it's no longer necessary to have a custom implementation, will leave the Dependency property
(won't action #3033 at this point in time)