Skip to content
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

System.Data.Sqlient isn't supported on this platform error in Update-Database #72

Closed
Petermarcu opened this issue Oct 11, 2017 · 14 comments
Milestone

Comments

@Petermarcu
Copy link
Member

@deanilvincent commented on Tue Oct 10 2017

Title: System.Data.Sqlient isn't supported on this platform error

General

Environment specifications:
Visual Studio 2017 15.3
Installed 2.0 .Net Core

I'm trying to use the command "update-database -context NameOfMyContext" but somehow I got this error message that says "System.Data.Sqlient isn't supported on this platform error"

Here's my connection string

services.AddDbContext<CompanyDbContext>(options => options.UseSqlServer(@"data source=ipaddress;initial catalog=testingdbcore;user id=username;password=password;integrated security=false;"));

To add up, I successfully added a migration and everything is working fine but then suddenly when I trigger the command for updating my database, I got this issues.

Thank you in advance!

bugerrorcore


@Petermarcu commented on Tue Oct 10 2017

@divega would this be an issue that should be in the EF repo or @saurabh500 should this issue go to corefx?


@saurabh500 commented on Wed Oct 11 2017

It should go to Corefx


@deanilvincent commented on Wed Oct 11 2017

What should I do now guys? Is there any option?


@saurabh500 commented on Wed Oct 11 2017

What is your OS that you are running the above steps on @deanilvincent ?


@saurabh500 commented on Wed Oct 11 2017

@deanilvincent From the screen shot it is Windows.

@danmoseley
Copy link
Member

@deanilvincent can you create a minimal repro, and zip it up for us?

@deanilvincent
Copy link

@saurabh500 I'm running Windows 10 and everything is updated.

@saurabh500
Copy link
Contributor

@deanilvincent thanks. How about a minimum repro as a zip or a GitHub repo?

@deanilvincent
Copy link

You're welcome @saurabh500 I think Github repo is a best choice :) Hold on. I'm creating test project :)

@deanilvincent
Copy link

@saurabh500
Copy link
Contributor

Can you also outline the steps you took to get this error message?

@deanilvincent
Copy link

deanilvincent commented Oct 12, 2017

Steps:

  1. Created my class model with primary key.
  2. Created by DbContext.
  3. Added services.AddDbContext(options=>options.UseSqlServer(@"some connection"));... inside the ConfigureServices.
  4. Right clicked the Controllers and chose MVC Controller with views, using Entity Framework and chose my db context.
  5. After the controller and view have been created, I typed in
    add-migration initialcreate
    and the class snapshot has been generated
  6. Lastly, I've entered
    update-database

Then that's where my error appears. @saurabh500

@divega
Copy link

divega commented Oct 12, 2017

@deanilvincent just in case it helps, do you have the final version of .NET Core SDK 2.0.0 installed in that machine?

@deanilvincent
Copy link

@divega Yes I have the final version of .Net Core SDK 2.0.0 downloaded from this link: https://www.microsoft.com/net/download/core

@deanilvincent
Copy link

Hello everyone :)

@deanilvincent
Copy link

Any updates for this?

@saurabh500 saurabh500 self-assigned this Mar 20, 2018
@saurabh500 saurabh500 removed their assignment Mar 30, 2018
@divega divega transferred this issue from dotnet/corefx May 16, 2019
@divega
Copy link

divega commented May 16, 2019

As recently announced in the .NET Blog, focus on new SqlClient features an improvements is moving to the new Microsoft.Data.SqlClient package. For this reason, we are moving this issue to the new repo at https://github.com/dotnet/SqlClient. We will still use https://github.com/dotnet/corefx to track issues on other providers like System.Data.Odbc and System.Data.OleDB, and general ADO.NET and .NET data access issues.

@David-Engel David-Engel added this to the 1.0.0 milestone May 17, 2019
@cheenamalhotra cheenamalhotra modified the milestones: 1.0.0, 1.1.0 Jul 25, 2019
@cheenamalhotra cheenamalhotra added this to To do in SqlClient v1.1.0 via automation Jul 25, 2019
@cheenamalhotra
Copy link
Member

@Petermarcu @deanilvincent

Please confirm if you're still facing this issue with Microsoft.Data.SqlClient as well and when does this issue trigger. It seems like the issue talks about "update-database" command, does that mean other commands work fine? or you get same error performing any operation with S.D.S or M.D.S.

@cheenamalhotra
Copy link
Member

Closing issue as inactive, as it is likely to be fixed already in recent versions of .NET Core.

@deanilvincent please provide more info in case you'd like to reopen the issue for Microsoft.Data.SqlClient.

SqlClient v1.1.0 automation moved this from To do to Done Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

7 participants