Open techsaau opened 5 days ago
The call stack is from System.Data.SqlClient so this is expected.
I removed System.Data.SqlClient from my project, not sure why it is still pointing to this.
I'm trying to Unit Testing here. Can someone help me out
Does your using include 'System.Data.SqlClient' namespace? Have you tried converting them to 'Microsoft.Data.SqlClient' instead?
@cheenamalhotra yes, I have replaced all the references from 'System.Data.SqlClient' to 'Microsoft.Data.SqlClient'. That's why it's bothering me.
But in project, primarily I use it in app.config only:
The error you're receiving is due to System.Data.SqlClient
being in use, so you need to figure out why is that happening.
To expand on the point above: the stack trace indicates that it's being called directly by the SqlDatabaseTestService class, which is part of the SQL Server unit testing functionality in MSBuild/Visual Studio. Perhaps this functionality still uses System.Data.SqlClient by default? If so, using the second overload of DeployDatabaseProject and specifying Microsoft.Data.SqlClient's provider name might help.
Describe the bug
I'm trying to connect to Azure SQL Database with "Active Directory Service Principal", It failed with below error:
But Same code works fine with "Active Directory Password" mode.
To reproduce
Below is the app.config file:
Expected behavior
A clear and concise description of what you expected to happen.
Further technical details
Microsoft.Data.SqlClient version: 5.2.2 .NET target: 4.7.2 SQL Server version: Azure SQL Server
Additional context Add any other context about the problem here.