mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 19:25:01 +00:00
82daa955a2
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