Using AppContext.BaseDirectory - as Assembly.Location might not be available in single-file applications.
This commit is contained in:
@@ -208,7 +208,7 @@ namespace Microsoft.EntityFrameworkCore
|
||||
if (!Path.IsPathRooted(path))
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(options.AbsoluteBasePath))
|
||||
options.AbsoluteBasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
options.AbsoluteBasePath = AppContext.BaseDirectory;
|
||||
|
||||
path = Path.Combine(options.AbsoluteBasePath, path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user