cannot use ConfigurationBuilder.AddJsonFile(<file>) #2416
Unanswered
MichalMKsiazek
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Environment
Pythonnet version: 3.0.3
Python version: 3.12.0
Operating System: Windows 11
.NET Runtime: 6.0.0
Doing some debug work on a project due to the following error:
Note I cannot share the entirety of the error and code as it contains podiatry code my organization forbids me to share
I've attempted to trace back this stack prior however when calling ConfigurationBuilder.AddJsonFile() i get the following
AttributeError: 'ConfigurationBuilder' object has no attribute 'AddJsonFile'even tho i have referenced "Microsoft.Extensions.Configuration" and "Microsoft.Extensions.Configuration.Json" not sure what i am doing wrong. I would imagine i am doing something wrong with referencing.Note i had no issues doing this in the VS environment i used to create a publication to source my dlls from.
Once i have tiem i wil ltry put together soem code with no proprietor references to support the debug process.
Bellow is the code that triggers the above exception. As you can see I am passing an absolute path. Note this issue does not occur in VS environment:
All reactions