Mohsen
Mohsen

Reputation: 1108

Visual Studio 2019 Unable to Convert Runtime Connection String to Its Design-Time Equivalent

I am using Microsoft Visual Studio Enterprise 2019 Version 16.5.5 and SQL Server 2016 on Windows 10.

When I want to Update Model from Database then I get the following error message:

enter image description here

My EDMX connection string is as follows:

metadata=res://*/Model.FruitShopEntities.csdl|res://*/Model.FruitShopEntities.ssdl|res://*/Model.FruitShopEntities.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQL2016;initial catalog=FruitShop;integrated security=False;User Id: sa; Password: 1;MultipleActiveResultSets=True;App=EntityFramework"

I have googled but couldn't find a solution.

Upvotes: 2

Views: 2633

Answers (1)

RainMoose
RainMoose

Reputation: 73

This still exists in Microsoft Visual Studio Community 2022 (64-bit) - Version 17.11.2.

After a lot of updating packages and research, I was able to resolve it by:

  1. Open your .edmx file in the designer.
  2. Save the file without making any changes.

You will be able to right click on the design surface and "Update Model from Database".

Upvotes: 1

Related Questions