Closed Metacinnabar closed 2 years ago
You must use the method DotNetEnv.Env.TraversePath().Load();
.
The real thing that matters is where the binary (exe) is located relative to the .env file. What Dave said is probably going to help though.
Thank you! This worked perfectly.
Description
After running
DotNetEnv.Env.Load();
no environment variables are added.Specifications
I am running EndeavourOS Linux. My code is running on .NET Core 6.
Code
...with the output of
token:
My .env
Located at
root/MyProject/.env
, whereroot
is where the solution file is located andMyProject
is where the project file is located.