You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
new EnvLoader().AddEnvFile(Path.Combine(Directory.GetCurrentDirectory(),".env").Load();
I ran this code on Windows, so the absolute path of the .env file is:
C:\Users\syslan\Documents\Visual Studio 2022\DotEnv.Core\src\bin\Debug\netcoreapp3.1
It seems that when the Load method does not find the .env file in the absolute path, it does not search for the .env file in the parent directories, i.e. if the .env file is not in netcoreapp3.1, it does not search in the directories above netcoreapp3.1. The loader should search in the parent directories such as Debug, bin, src, etc.
The text was updated successfully, but these errors were encountered:
Example:
I ran this code on Windows, so the absolute path of the .env file is:
It seems that when the
Load
method does not find the .env file in the absolute path, it does not search for the .env file in the parent directories, i.e. if the .env file is not innetcoreapp3.1
, it does not search in the directories abovenetcoreapp3.1
. The loader should search in the parent directories such as Debug, bin, src, etc.The text was updated successfully, but these errors were encountered: