-1

Just downloaded the vs community edition 2019 version 16.7.7 and it flag off an error saying couldn't download microsoft.net.4.7.targetingpack/resources however I launched the vs community 2019, started a asp.netcore web application and wrote a single class and scallfolded a controller with a CRUD view but my problem is I can not connect to the database. My connection string is fine at the appjson setting also my startup.cs because I have checked all the suggestions offered here, and I implemented them! Please help! Is my vs-2019 corrupted.

  • Which way are trying to connect to DB? Could you please show a pice of code where are you getting the connection errror? – Serge Oct 31 '20 at 23:20
  • Sounds like you are using SQL.Client class. The error indicates the dll for the client cannot be found. See following : https://stackoverflow.com/questions/35444487/how-to-use-sqlclient-in-asp-net-core – jdweng Oct 31 '20 at 23:25
  • Hi everyone, I really appreciate the feedback, it means a lot to me because it shows I'm not coding alone. I figured out my problem. – Joel Okafor Nov 01 '20 at 19:18

1 Answers1

0

I want to say thank you everyone for listening to me, however I figured out that I didn't generate a database creation code by enabling migration and adding a migration which will do that automatically and save a snapshot schema that will be used to create the actual database in the database management environment. Please that was my mistake. Add migration and update database and your good to code some more