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

Microsoft.Data.SqlClient.SNI.pdb not found with V2.0.0 #652

Closed
genifycom opened this issue Jun 26, 2020 · 12 comments
Closed

Microsoft.Data.SqlClient.SNI.pdb not found with V2.0.0 #652

genifycom opened this issue Jun 26, 2020 · 12 comments

Comments

@genifycom
Copy link

Issue Title

Just published a console app using Microsoft.Data.SqlClient V2.0.0 and runtime fails to run when: <PublishSingleFile>true</PublishSingleFile>

General

I have tried with and without <IncludeSymbolsInSingleFile>true</IncludeSymbolsInSingleFile>

The error is
An assembly specified in the application dependencies manifest (MyApp.deps.json) was not found:
package: 'Microsoft.Data.SqlClient.SNI.runtime', version: '2.0.0'
path: 'runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.pdb'

For some issues, you will get a quicker and better response if you file it at a more specific .NET repo. For example, if the problem is with ASP.NET Core, you are encouraged to use the aspnet/home repo.

@steckdev
Copy link

I'm running into the same issue. 👍

@cheenamalhotra cheenamalhotra transferred this issue from dotnet/core Jul 15, 2020
@cheenamalhotra
Copy link
Member

cheenamalhotra commented Jul 15, 2020

@genifycom

Do you still face this issue?
Could you provide us a small repro to demo the error?

Or if this is duplicate of #595 please feel free to close this.

@genifycom
Copy link
Author

genifycom commented Jul 15, 2020

The <PublishSingleFile>true</PublishSingleFile> must be placed between the <PropertyGroup> tags and not the <ItemGroup> tags.

Thank you

@alfeg
Copy link

alfeg commented Aug 12, 2020

@cheenamalhotra
Hi, we have similiar issue with 3rd party libary that started use of Microsoft.Data.SqlClient v2.0.0
Here is a issue in corresponding Quartz library with stemp to reproduce quartz-scheduler/quartz#617

@jjxtra
Copy link

jjxtra commented Nov 21, 2020

Issue exists in .net 5 rtm release as well, any ideas how to fix? Seems to possibly be an issue with Microsoft.Data.SqlClient v. 2.1.0, trying 2.0.1 instead to see if it works.

@cheenamalhotra
Copy link
Member

cheenamalhotra commented Nov 21, 2020

Your dependency hierarchy should be as under with Microsoft.Data.SqlClient v2.1.0.

> Note: Microsoft.Data.SqlClient.SNI.runtime version should be 2.1.1

image

@jjxtra
Copy link

jjxtra commented Nov 21, 2020

Microsoft.EntityFrameworkCore.SqlServer 5.0.0 is referecing the wrong Microsoft.Data.SqlClient - 2.0.1, this is where the problem is. Please add that to your project and remove the Microsoft.Data.SqlClient 2.1.0 package and you should get the error.

Adding both Microsoft.Data.SqlClient 2.1.0 and Microsoft.EntityFrameworkCore.SqlServer 5.0.0 works as well, but it took me several days of troubleshooting to realize this.

Most people diving into entity framework may only add the entity framework packages and then have headaches with self contained builds. Hopefully next version of sql server entity framework can reference the newer Microsoft.Data.SqlClient 2.1.0.

@mstoicescu
Copy link

Work for me too

@ghost
Copy link

ghost commented Feb 11, 2021

Microsoft.EntityFrameworkCore.SqlServer 5.0.0 is referecing the wrong Microsoft.Data.SqlClient - 2.0.1, this is where the problem is. Please add that to your project and remove the Microsoft.Data.SqlClient 2.1.0 package and you should get the error.

Adding both Microsoft.Data.SqlClient 2.1.0 and Microsoft.EntityFrameworkCore.SqlServer 5.0.0 works as well, but it took me several days of troubleshooting to realize this.

Most people diving into entity framework may only add the entity framework packages and then have headaches with self contained builds. Hopefully next version of sql server entity framework can reference the newer Microsoft.Data.SqlClient 2.1.0.

Thanks for sharing, it worked for me. This is still happening in version 5.0.3 of Microsoft.EntityFrameworkCore.SqlServer, the moment I added the direct reference to Microsoft.Data.SqlClient to my project it automatically refreshed the version inside EF package.

image

@gabrielionita
Copy link

gabrielionita commented Apr 15, 2021

Still happening in Microsoft.EntityFrameworkCore.SqlServer 5.0.5.
Added the direct reference to Microsoft.Data.SqlClient 2.1.2 and it worked

@PylotLight
Copy link

Still an issue on 5.0.8.
Referencing Microsoft.Data.SqlClient 3.0.0 seems to have fixed it as others have suggested though.

@mihailsidoroff
Copy link

mihailsidoroff commented Oct 7, 2021

came across on this bug with Microsoft.EntityFrameworkCore 5.0.9
Adding Microsoft.Data.SqlClient Version="3.0.1" directly in proj fixed it
Thanks, @jjxtra.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants