Using AppContext.BaseDirectory - as Assembly.Location might not be available in single-file applications.
This commit is contained in:
@@ -521,7 +521,7 @@ namespace AMWD.Common.Tests.Utilities
|
||||
public void ShouldCreateDefaultFile()
|
||||
{
|
||||
// arrange
|
||||
string executingAssemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
string executingAssemblyDir = AppContext.BaseDirectory;
|
||||
string filePath = Path.Combine(executingAssemblyDir, "crypto.key");
|
||||
|
||||
// act
|
||||
|
||||
Reference in New Issue
Block a user