Skip to content

Unable to resolve service for type 'Microsoft.Extensions.Configuration.IConfiguration' while attempting to activate 'DotNotStandard.DataAccess.Core.ConnectionAddressManager'.))” #7

Answered by TheCakeMonster
knox007 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

Sorry for the delay, this notification got lost in amongst other work communications.

This error isn't directly related to the generated code, as such. This error message indicates that the host application is not initializing configuration. That's unusual for an ASP.NET host, so are you perhaps using another host? Your message doesn't mention what technology your host application uses.

You may need to manually add configuration to whatever HostBuilder is used to initialize the host environment you are using. Here's an example snippet, but note that this creates a new HostBuilder; in general you want to add the request for configuration to an existing HostBuilder.

new HostBuilder()
	.C…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by knox007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants