-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add-Migration NullReferenceException using App.config. Failing to find config #22205
Comments
@bricelam to find dupe. |
Blocked on dotnet/runtime#931 |
Experiencing the same issue as described by TimMcGilly. Any progress on this?
|
What is the status on this, i.e. is there a deadline for when this will be fixed? And for which versions of dotnet will it be fixed? I have had the same problem for approximately a year, but didn't report it. |
@skrabbe001 This is currently planned for EF Core 7.0, as indicated by the milestone. This will be released with .NET 7. See the planning process for more information on how we plan what gets fixed in a release. |
I have 3 projects: a DataAccess(.net standard) with dbcontext, a UI project (wpf .net core startup project) and model project (.net standard).
I have a file called App.config in both UI and DataAccess projects with this code
I am loading the configuration with
System.Configuration
and this overrideWhen running Add-Migration it throws a null-reference exception due to not finding configuration.
This is run from within visual studio from the Package Managed Console with Default project set to DataAccess and the startup project set to UI.
Using
it appears it is attempting to open
Changing the
App.config
Copy to Output to Copy Always does not resolve the issue.Further technical details
EF Core version: 3.1.7
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET Core 3.1, .Net Standard 2.1
Operating system:
IDE: Visual Studio 2019 16.7.2
The text was updated successfully, but these errors were encountered: