You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ref/net46/Microsoft.Data.SqlClient.dll assembly in the Microsoft.Data.SqlClient package (both 1.1.1 and 2.0.0-preview1.20021.1) is missing the [assembly: CLSCompliant(true)] attribute, even though assemblies in the lib/net46 and runtimes/win/lib/net46 folders do have the attribute.
This leads to CS3001 and CS3003 (not CLS-compliant) build warnings when using e.g. SqlBulkCopyOptions in a public API in a CLS compliant assembly targeting .NET 4.6.1:
In contrast, the System.Data.SqlClient package does not have this issue (i.e.
the ref/net46/Microsoft.Data.SqlClient.dll assembly does have the attribute).
To reproduce
Reference SqlBulkCopyOptions in a public API in a CLS compliant assembly targeting .NET 4.6.1:
AssemblyInfo.cs:
[assembly: CLSCompliant(true)]
Program.cs:
using Microsoft.Data.SqlClient;
public class MyClass
{
public SqlBulkCopyOptions SqlBulkCopyOptions { get; set; }
}
This gives a build warning:
Warning CS3003 Type of 'MyClass.SqlBulkCopyOptions' is not CLS-compliant
Expected behavior
No CLS related build warnings.
Further technical details
Microsoft.Data.SqlClient version: 1.1.1 and 2.0.0-preview1.20021.1
.NET target: .NET Framework 4.6.1
Operating system: Windows 10
The text was updated successfully, but these errors were encountered:
Describe the bug
The
ref/net46/Microsoft.Data.SqlClient.dll
assembly in the Microsoft.Data.SqlClient package (both 1.1.1 and 2.0.0-preview1.20021.1) is missing the[assembly: CLSCompliant(true)]
attribute, even though assemblies in the lib/net46 and runtimes/win/lib/net46 folders do have the attribute.This leads to CS3001 and CS3003 (not CLS-compliant) build warnings when using e.g. SqlBulkCopyOptions in a public API in a CLS compliant assembly targeting .NET 4.6.1:
In contrast, the System.Data.SqlClient package does not have this issue (i.e.
the
ref/net46/Microsoft.Data.SqlClient.dll
assembly does have the attribute).To reproduce
Reference SqlBulkCopyOptions in a public API in a CLS compliant assembly targeting .NET 4.6.1:
AssemblyInfo.cs:
Program.cs:
This gives a build warning:
Expected behavior
No CLS related build warnings.
Further technical details
Microsoft.Data.SqlClient version: 1.1.1 and 2.0.0-preview1.20021.1
.NET target: .NET Framework 4.6.1
Operating system: Windows 10
The text was updated successfully, but these errors were encountered: