Just published a console app using Microsoft.Data.SqlClient V2.0.0 and runtime fails to run when: <PublishSingleFile>true</PublishSingleFile>
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.
I'm running into the same issue. 馃憤
@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.
The <PublishSingleFile>true</PublishSingleFile>
must be placed between the <PropertyGroup>
tags and not the <ItemGroup>
tags.
Thank you
@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 https://github.com/quartz-scheduler/quartz/issues/617
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.
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
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.
Work for me too
Most helpful comment
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.