Skip to content

Commit a7a4e43

Browse files
wtgodbeCopilot
andauthored
Add Microsoft.Data.SqlClient.Extensions.Azure to Individual Auth templates (#66179)
* Add Microsoft.Data.SqlClient.Extensions.Azure to Individual Auth templates In .NET 11 Preview 3, Microsoft.Data.SqlClient moved Active Directory authentication providers to a separate package (Microsoft.Data.SqlClient.Extensions.Azure). When publishing Individual Accounts templates to Azure App Service with Azure SQL, Visual Studio configures the connection string with Authentication=Active Directory Default, which requires this package. Without it, users get: Cannot find an authentication provider for 'ActiveDirectoryDefault' Add the package reference to all three affected templates (MVC, Blazor, Razor Pages) conditional on IndividualLocalAuth + UseLocalDB. Fixes #66107 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update Microsoft.Data.SqlClient version to 7.0.0 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ea55452 commit a7a4e43

6 files changed

Lines changed: 7 additions & 1 deletion

File tree

eng/Dependencies.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ may be turned into `<PackageReference>` items in projects.
213213
<LatestPackageReference Include="MessagePack" />
214214
<LatestPackageReference Include="MessagePackAnalyzer" />
215215
<LatestPackageReference Include="Microsoft.Data.SqlClient" />
216+
<LatestPackageReference Include="Microsoft.Data.SqlClient.Extensions.Azure" />
216217
<LatestPackageReference Include="Microsoft.Windows.CsWin32" />
217218
<LatestPackageReference Include="Mono.Cecil" />
218219
<LatestPackageReference Include="Mono.TextTemplating" />

eng/Versions.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@
181181
<XunitExtensibilityCoreVersion>$(XunitVersion)</XunitExtensibilityCoreVersion>
182182
<XunitExtensibilityExecutionVersion>$(XunitVersion)</XunitExtensibilityExecutionVersion>
183183
<XUnitRunnerVisualStudioVersion>3.1.3</XUnitRunnerVisualStudioVersion>
184-
<MicrosoftDataSqlClientVersion>5.2.2</MicrosoftDataSqlClientVersion>
184+
<MicrosoftDataSqlClientVersion>7.0.0</MicrosoftDataSqlClientVersion>
185+
<MicrosoftDataSqlClientExtensionsAzureVersion>1.0.0</MicrosoftDataSqlClientExtensionsAzureVersion>
185186
<MicrosoftOpenApiVersion>3.3.1</MicrosoftOpenApiVersion>
186187
<MicrosoftOpenApiYamlReaderVersion>3.3.1</MicrosoftOpenApiYamlReaderVersion>
187188
<!-- dotnet tool versions (see also auto-updated DotnetEfVersion property). -->

src/ProjectTemplates/Web.ProjectTemplates/BlazorWebCSharp.csproj.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="${MicrosoftAspNetCoreIdentityEntityFrameworkCoreVersion}" Condition="'$(IndividualLocalAuth)' == 'True'" />
2626
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="${MicrosoftEntityFrameworkCoreSqliteVersion}" Condition="'$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True'" />
2727
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="${MicrosoftEntityFrameworkCoreSqlServerVersion}" Condition="'$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' == 'True'" />
28+
<PackageReference Include="Microsoft.Data.SqlClient.Extensions.Azure" Version="${MicrosoftDataSqlClientExtensionsAzureVersion}" Condition="'$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' == 'True'" />
2829
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="${MicrosoftEntityFrameworkCoreDesignVersion}" PrivateAssets="all" Condition="'$(IndividualLocalAuth)' == 'True'" />
2930
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="${MicrosoftEntityFrameworkCoreToolsVersion}" Condition="'$(IndividualLocalAuth)' == 'True'" />
3031
</ItemGroup>

src/ProjectTemplates/Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
MicrosoftEntityFrameworkCoreDesignVersion=$(MicrosoftEntityFrameworkCoreDesignVersion);
1818
MicrosoftEntityFrameworkCoreSqliteVersion=$(MicrosoftEntityFrameworkCoreSqliteVersion);
1919
MicrosoftEntityFrameworkCoreSqlServerVersion=$(MicrosoftEntityFrameworkCoreSqlServerVersion);
20+
MicrosoftDataSqlClientExtensionsAzureVersion=$(MicrosoftDataSqlClientExtensionsAzureVersion);
2021
MicrosoftEntityFrameworkCoreToolsVersion=$(MicrosoftEntityFrameworkCoreToolsVersion);
2122
MicrosoftExtensionsHostingVersion=$(MicrosoftExtensionsHostingVersion);
2223
MicrosoftExtensionsHttpVersion=$(MicrosoftExtensionsHttpVersion);

src/ProjectTemplates/Web.ProjectTemplates/RazorPagesWeb-CSharp.csproj.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="${MicrosoftAspNetCoreIdentityUIVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' " />
2323
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="${MicrosoftEntityFrameworkCoreSqliteVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True'" />
2424
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="${MicrosoftEntityFrameworkCoreSqlServerVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' == 'True'" />
25+
<PackageReference Include="Microsoft.Data.SqlClient.Extensions.Azure" Version="${MicrosoftDataSqlClientExtensionsAzureVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' == 'True'" />
2526
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="${MicrosoftEntityFrameworkCoreDesignVersion}" PrivateAssets="all" Condition=" '$(IndividualLocalAuth)' == 'True' " />
2627
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="${MicrosoftEntityFrameworkCoreToolsVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' " />
2728
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="${MicrosoftAspNetCoreAuthenticationJwtBearerVersion}" Condition=" '$(IndividualB2CAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'" NoWarn="NU1605" />

src/ProjectTemplates/Web.ProjectTemplates/StarterWeb-CSharp.csproj.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="${MicrosoftAspNetCoreIdentityEntityFrameworkCoreVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' " />
2222
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="${MicrosoftAspNetCoreIdentityUIVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' " />
2323
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="${MicrosoftEntityFrameworkCoreSqlServerVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' == 'True'" />
24+
<PackageReference Include="Microsoft.Data.SqlClient.Extensions.Azure" Version="${MicrosoftDataSqlClientExtensionsAzureVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' == 'True'" />
2425
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="${MicrosoftEntityFrameworkCoreSqliteVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' AND '$(UseLocalDB)' != 'True'" />
2526
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="${MicrosoftEntityFrameworkCoreDesignVersion}" PrivateAssets="all" Condition=" '$(IndividualLocalAuth)' == 'True' " />
2627
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="${MicrosoftEntityFrameworkCoreToolsVersion}" Condition=" '$(IndividualLocalAuth)' == 'True' " />

0 commit comments

Comments
 (0)