Upgrade to 4.0, I get a message when the app runs in an installer can't find Microsoft.Data.SqlClient 3.0.0 #1448
Description
Describe the bug
I updaded a project and Nuget package to .NET6, updgraded from System.Data.SqlClient to Microsoft.Data.SqlClient 4.0.0, and the installer runs. When I try and connect to a database, I get the error can't find Microsoft.Data.SqlClient version 3.0.0.
With packages references I knew how to add a binding redirect, I don't see how to that in a Project file.
Just a comment, your breaking change of 'Encrypt = true' now by default. I went the other way. I started off with encryption by default in 2010 and decided in 2019 it was time to make it Encrypted = false. You broke my project DB Compare, because people paste in connection strings, and they won't work now. I wish this was an option, not a dictate by you. Not everyone is as paranoid about security as you are.
Can someone explain to me how to force the entire app to use 4.0.0 version?
If you are seeing an exception, include the full exceptions details (message and stack trace).
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Data.SqlClient, Version=3.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'. The system cannot find the file specified.
File name: 'Microsoft.Data.SqlClient, Version=3.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'
at DataJuggler.Net6.ConnectionStringHelper.BuildConnectionString(String serverName, String databaseName)
at DBCompare.ConnectionStringBuilderForm.BuildConnectionStringButton_Click(Object sender, EventArgs e) in C:\Projects\GitHub\DBCompare\DBCompare\ConnectionStringBuilderForm.cs:line 65
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
System.Private.CoreLib
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Private.CoreLib.dll
DBCompare
Assembly Version: 6.0.0.0
Win32 Version: 6.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/Data%20Juggler/DB%20Compare/DBCompare.dll
System.Runtime
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Runtime.dll
System.Windows.Forms
Assembly Version: 6.0.1.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.1/System.Windows.Forms.dll
System.ComponentModel.Primitives
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.ComponentModel.Primitives.dll
System.Windows.Forms.Primitives
Assembly Version: 6.0.1.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.1/System.Windows.Forms.Primitives.dll
System.Runtime.InteropServices
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Runtime.InteropServices.dll
System.Drawing.Primitives
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Drawing.Primitives.dll
System.Collections.Specialized
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Collections.Specialized.dll
DataJuggler.Win.Controls
Assembly Version: 5.8.9.0
Win32 Version: 5.8.9.0
CodeBase: file:///C:/Program%20Files%20(x86)/Data%20Juggler/DB%20Compare/DataJuggler.Win.Controls.dll
System.Threading
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Threading.dll
System.Diagnostics.TraceSource
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Diagnostics.TraceSource.dll
System.Collections
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Collections.dll
System.Drawing.Common
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.1/System.Drawing.Common.dll
Microsoft.Win32.Primitives
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/Microsoft.Win32.Primitives.dll
System.ComponentModel.EventBasedAsync
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.ComponentModel.EventBasedAsync.dll
System.Threading.Thread
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Threading.Thread.dll
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.1/Accessibility.dll
System.ComponentModel.TypeConverter
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.ComponentModel.TypeConverter.dll
System.ComponentModel
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.ComponentModel.dll
System.Numerics.Vectors
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Numerics.Vectors.dll
Microsoft.Win32.SystemEvents
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.1/Microsoft.Win32.SystemEvents.dll
System.Resources.Extensions
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.1/System.Resources.Extensions.dll
System.Memory
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Memory.dll
System.Drawing
Assembly Version: 6.0.1.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.1/System.Drawing.dll
System.ObjectModel
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.ObjectModel.dll
System.Linq
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Linq.dll
System.Collections.NonGeneric
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Collections.NonGeneric.dll
System.Configuration.ConfigurationManager
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/6.0.1/System.Configuration.ConfigurationManager.dll
DataJuggler.UltimateHelper
Assembly Version: 1.6.8.0
Win32 Version: 1.6.8.0
CodeBase: file:///C:/Program%20Files%20(x86)/Data%20Juggler/DB%20Compare/DataJuggler.UltimateHelper.dll
System.Private.Uri
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Private.Uri.dll
System.Runtime.InteropServices.RuntimeInformation
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Runtime.InteropServices.RuntimeInformation.dll
System.Security.Cryptography.Algorithms
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Security.Cryptography.Algorithms.dll
System.Security.Cryptography.Primitives
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Security.Cryptography.Primitives.dll
System.Xml.ReaderWriter
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Xml.ReaderWriter.dll
System.Private.Xml
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Private.Xml.dll
System.Text.RegularExpressions
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Text.RegularExpressions.dll
System.Net.WebClient
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Net.WebClient.dll
System.Text.Encoding.Extensions
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Text.Encoding.Extensions.dll
System.Runtime.Serialization.Formatters
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Runtime.Serialization.Formatters.dll
System.Xml.XmlSerializer
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Xml.XmlSerializer.dll
System.Runtime.CompilerServices.Unsafe
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Runtime.CompilerServices.Unsafe.dll
System.Collections.Concurrent
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Collections.Concurrent.dll
DataJuggler.Net6
Assembly Version: 6.0.0.0
Win32 Version: 6.0.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/Data%20Juggler/DB%20Compare/DataJuggler.Net6.dll
System.Runtime.Loader
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Runtime.Loader.dll
System.Diagnostics.StackTrace
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Diagnostics.StackTrace.dll
System.Reflection.Metadata
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Reflection.Metadata.dll
System.Collections.Immutable
Assembly Version: 6.0.0.0
Win32 Version: 6.0.121.56705
CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/6.0.1/System.Collections.Immutable.dll
************** JIT Debugging **************
Exception message:
Stack trace:
To reproduce
Include a complete code listing (or project/solution) that we can run to reproduce the issue.
Partial code listings, or multiple fragments of code, will slow down our response or cause us to push the issue back to you to provide code to reproduce the issue.
Console.WriteLine("Hello World!");
Expected behavior
A clear and concise description of what you expected to happen.
Further technical details
Microsoft.Data.SqlClient version: (found on the nuget or Microsoft.Data.SqlClient.dll)
.NET target: (e.g. Framework 4.7.1, Core 2.2.2)
SQL Server version: (e.g. SQL Server 2017)
Operating system: (e.g. Windows 2019, Ubuntu 18.04, macOS 10.13, Docker container)
Additional context
Add any other context about the problem here.
Activity