1

I am trying to migrate the WPF App with SQLite DB to net 5 and encounter the following problem on Runtime. The app complies and the resources and settings are migrated according to the documentation: https://learn.microsoft.com/en-us/dotnet/desktop/winforms/migration/?view=netdesktop-6.0

The exception is in a subclass of DbContext: System.TypeInitializationException: 'The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception.'

  1. System.Configuration.ConfigurationErrorsException: 'Configuration system failed to initialize'
  2. ConfigurationErrorsException: Unrecognized configuration section system.web.

enter image description here

I think it is something related to the Resources or Settings of the connection string.

2
  • This issue is after running Upgrade Assistant, and compiling the App Commented Dec 6, 2021 at 10:25
  • After reading your error message it may be useful to know that you can't use System.Web in .NET Core to access HttpContext. You can add reference, but HttpContext wll never populate Commented Dec 6, 2021 at 10:45

1 Answer 1

1

You could use instead Microsoft's upgrading tool 'Upgrade Assistant': https://learn.microsoft.com/nl-nl/dotnet/core/porting/upgrade-assistant-overview?WT.mc_id=dotnet-35129-website

Here you can follow step by step guide : https://dotnet.microsoft.com/platform/upgrade-assistant

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, but this is after running Upgrade Assistant and compiling the App

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.