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
There is a significant discrepancy between the two SqlConnectionStringBuilder types as far as their internal keywords are defined.
The keywords can be found in the internal class DbConnectionStringKeywords. An example:
When a connection string is built using the Microsoft.Data.SqlClient.SqlConnectionStringBuilder, it cannot be deconstructed within the System.Data.SqlClient.SqlConnectionStringBuilder as it throws an exception indicating that the keyword is not supported.
To reproduce
Run the following code in a project that is using Microsoft.Data.SqlClient:
Ok, thank you. I attempted a search for anything related to breaking changes regarding this issue and I was unable to find the PR you mentioned or other supporting details. Thank you for the information. I'll adjust accordingly and add workarounds.
Describe the bug
There is a significant discrepancy between the two SqlConnectionStringBuilder types as far as their internal keywords are defined.
The keywords can be found in the internal class DbConnectionStringKeywords. An example:
SqlClient/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/DbConnectionStringCommon.cs
Line 1039 in 04db1a4
However, in the .NET Framework version of the System.Data.SqlClient, the same keywords class has it defined differently:
https://referencesource.microsoft.com/System.Data/R/6a6a501b9f709c06.html
This is an example keyword, but there are more keywords where this is an issue.
Here's the code excerpt for both:
Microsoft.Data.SqlClient
System.Data.SqlClient
When a connection string is built using the Microsoft.Data.SqlClient.SqlConnectionStringBuilder, it cannot be deconstructed within the System.Data.SqlClient.SqlConnectionStringBuilder as it throws an exception indicating that the keyword is not supported.
To reproduce
Run the following code in a project that is using Microsoft.Data.SqlClient:
Take the connection string from that and then apply it to a different set of code using the System.Data.SqlClient:
The following exception will occur:
System.ArgumentException: 'Keyword not supported: 'trust server certificate'.'
Expected behavior
I would expect that the keywords would match and thus the connection strings would be interchangeable.
Further technical details
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: