Ruffone
asked on
Could not load file or assembly 'System.Configuration.ConfigurationManager,
Why might I getting this error. I am trying to connect to a DB from a console application and get this error.
FileNotFoundException: Could not load file or assembly 'System.Configuration.Conf igurationM anager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2 ddd51'. The system cannot find the file specified.
FileNotFoundException: Could not load file or assembly 'System.Configuration.Conf
Imports System.Data.Entity
Module Program
Dim people As IEnumerable(Of Person) = New List(Of Person)
Sub Main(ByVal args As String())
Using context = New EFDbContext() '<--- Error here
Dim repo As ITestRepository = New EFRepository(Of EFDbContext)(context)
End Using
End Sub
End Module
Public Class EFDbContext
Inherits DbContext
Public Sub New()
MyBase.New("name=EFDbContext")
End Sub
Public Property People As DbSet(Of Person)
End Class
System.Configuration.Confi gurationMa nager is not added as a reference by default. Add it and retry
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.