mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-05 03:32:37 +00:00
f4dc756597
In .NET 5.0 and later versions, for bundled assemblies, Assembly.Location is an empty string. https://docs.microsoft.com/en-us/dotnet/api/system.reflection.assembly.location?view=net-5.0 Which results in Path.GetDirectoryName returning null, in that case use use AppContext.BaseDirectory otherwise Path.Combine will throw an exception. In .NET 5.0 and later versions, for bundled assemblies, AppContext.BaseDirectory returns the containing directory of the host executable. https://docs.microsoft.com/en-us/dotnet/api/system.appcontext.basedirectory?view=net-5.0 Related discussion https://github.com/cefsharp/CefSharp/discussions/3533