Skip to content

File Version for Package Microsoft.Data.SqlClient 5.1 lists as 5.0 #1945

Description

@DataJuggler

Describe the bug

My actual bug is a release version of my opensource project DBCompare says 'Can't find Microsoft.Data.SqlClient 5.0'.
This is strange to me, because the package that brings in Microsoft.Data.SqlClient references version 5.1.
I looked in the bin directory of my project, and Windows Explorer lists the class as File Version 5.0.0.

I recreated a new project, and added only Microsoft.Data.SqlClient 5.1, and in Windows Explorer, it lists as File Version 5.0.

This makes it harder for me to determine why the release version is not working. Is something actually looking for 5.0 version, or is the message shown for can't find 5.1 but the file version is 5.0 so it shows me the wrong message?

Here are the references from my project
image

When I add the file in Advanced Installer, Advanced Installer lists the file as version 5.0:

image

The code is here if it helps:
https://github.com/DataJuggler/DBCompare

The Release version has the problem. Install the app. Click on the Connection elipses ..., and in the Connection String Builder Form when you click the Build Connection String button is when the error happens.

It is hard to debug this 5.1 Microsoft.Data.SqlClient lists as 5.0. Not sure why the app can't find the file, the file Microsoft.Data.SqlClient is included in the install directory.

If you are seeing an exception, include the full exceptions details (message and stack trace).

Exception message:
Stack trace:

Here is the error result from the install version:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'. The system cannot find the file specified.
File name: 'Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5'
   at DataJuggler.Net7.ConnectionStringHelper.BuildConnectionString(String serverName, String databaseName, Boolean encrypt)
   at DBCompare.ConnectionStringBuilderForm.BuildConnectionStringButton_Click(Object sender, EventArgs e) in C:\Projects\GitHub\DBCompare\DBCompare\ConnectionStringBuilderForm.cs:line 67
   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: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Private.CoreLib.dll
----------------------------------------
DBCompare
    Assembly Version: 7.0.0.0
    Win32 Version: 6.3.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Data%20Juggler/DB%20Compare%207.0.0/DBCompare.dll
----------------------------------------
System.Runtime
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Runtime.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60608
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/7.0.2/System.Windows.Forms.dll
----------------------------------------
System.ComponentModel.Primitives
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.ComponentModel.Primitives.dll
----------------------------------------
System.Windows.Forms.Primitives
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60608
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/7.0.2/System.Windows.Forms.Primitives.dll
----------------------------------------
System.Runtime.InteropServices
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Runtime.InteropServices.dll
----------------------------------------
System.Drawing.Primitives
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Drawing.Primitives.dll
----------------------------------------
System.Collections.Specialized
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Collections.Specialized.dll
----------------------------------------
DataJuggler.Win.Controls
    Assembly Version: 7.1.1.0
    Win32 Version: 6.1.2
    CodeBase: file:///C:/Program%20Files%20(x86)/Data%20Juggler/DB%20Compare%207.0.0/DataJuggler.Win.Controls.dll
----------------------------------------
System.Threading
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Threading.dll
----------------------------------------
System.Diagnostics.TraceSource
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Diagnostics.TraceSource.dll
----------------------------------------
System.Collections
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Collections.dll
----------------------------------------
System.Drawing.Common
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/7.0.2/System.Drawing.Common.dll
----------------------------------------
Microsoft.Win32.Primitives
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/Microsoft.Win32.Primitives.dll
----------------------------------------
System.ComponentModel.EventBasedAsync
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.ComponentModel.EventBasedAsync.dll
----------------------------------------
System.Threading.Thread
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Threading.Thread.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 7.0.222.60608
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/7.0.2/Accessibility.dll
----------------------------------------
System.ComponentModel.TypeConverter
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.ComponentModel.TypeConverter.dll
----------------------------------------
System.ComponentModel
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.ComponentModel.dll
----------------------------------------
System.Memory
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Memory.dll
----------------------------------------
System.Numerics.Vectors
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Numerics.Vectors.dll
----------------------------------------
Microsoft.Win32.SystemEvents
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/7.0.2/Microsoft.Win32.SystemEvents.dll
----------------------------------------
System.Resources.Extensions
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/7.0.2/System.Resources.Extensions.dll
----------------------------------------
System.Drawing
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60608
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/7.0.2/System.Drawing.dll
----------------------------------------
System.Collections.Concurrent
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Collections.Concurrent.dll
----------------------------------------
System.ObjectModel
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.ObjectModel.dll
----------------------------------------
System.Linq
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Linq.dll
----------------------------------------
System.Collections.NonGeneric
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Collections.NonGeneric.dll
----------------------------------------
System.Configuration.ConfigurationManager
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.WindowsDesktop.App/7.0.2/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%207.0.0/DataJuggler.UltimateHelper.dll
----------------------------------------
System.Private.Uri
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Private.Uri.dll
----------------------------------------
System.Security.Cryptography
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Security.Cryptography.dll
----------------------------------------
System.Xml.ReaderWriter
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Xml.ReaderWriter.dll
----------------------------------------
System.Private.Xml
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Private.Xml.dll
----------------------------------------
System.Net.WebClient
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Net.WebClient.dll
----------------------------------------
System.Text.Encoding.Extensions
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Text.Encoding.Extensions.dll
----------------------------------------
System.Runtime.Serialization.Formatters
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Runtime.Serialization.Formatters.dll
----------------------------------------
System.Xml.XmlSerializer
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Xml.XmlSerializer.dll
----------------------------------------
DataJuggler.Net7
    Assembly Version: 7.0.2.0
    Win32 Version: 7.0.2.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Data%20Juggler/DB%20Compare%207.0.0/DataJuggler.Net7.dll
----------------------------------------
System.Runtime.Loader
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Runtime.Loader.dll
----------------------------------------
System.Diagnostics.StackTrace
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Diagnostics.StackTrace.dll
----------------------------------------
System.Reflection.Metadata
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Reflection.Metadata.dll
----------------------------------------
System.Collections.Immutable
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Collections.Immutable.dll
----------------------------------------
System.IO.MemoryMappedFiles
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.IO.MemoryMappedFiles.dll
----------------------------------------
System.Diagnostics.FileVersionInfo
    Assembly Version: 7.0.0.0
    Win32 Version: 7.0.222.60605
    CodeBase: file:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.2/System.Diagnostics.FileVersionInfo.dll
----------------------------------------

************** JIT Debugging **************

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area\NetcoreIssues that apply only to .NET runtime or the 'netcore' project folder.Regression 💥Issues that are regressions introduced from earlier PRs.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions