Skip to content

Commit 299fff2

Browse files
Multi target projects that would otherwise cause issues when restored in higher TFMs (#10661)
Co-authored-by: Jose Perez Rodriguez <[email protected]>
1 parent 19911f2 commit 299fff2

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

src/Aspire.Hosting.Azure.Sql/Aspire.Hosting.Azure.Sql.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
4+
<!-- This project needs to multi-target to net9.0 as well to avoid hitting NuGet Restore issues when package is restored from a net9+ project and avoid NU1605 downgrade errors. -->
5+
<TargetFrameworks>$(AllTargetFrameworks)</TargetFrameworks>
56
<IsPackable>true</IsPackable>
67
<PackageTags>aspire integration hosting azure</PackageTags>
78
<Description>Azure SQL Database resource types for .NET Aspire.</Description>

src/Aspire.Hosting.SqlServer/Aspire.Hosting.SqlServer.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
4+
<!-- This project needs to multi-target to net9.0 as well to avoid hitting NuGet Restore issues when package is restored from a net9+ project and avoid NU1605 downgrade errors. -->
5+
<TargetFrameworks>$(AllTargetFrameworks)</TargetFrameworks>
56
<IsPackable>true</IsPackable>
67
<PackageTags>aspire integration hosting sqlserver sql</PackageTags>
78
<Description>Microsoft SQL Server support for .NET Aspire.</Description>

src/Components/Aspire.Azure.AI.Inference/Aspire.Azure.AI.Inference.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
4+
<!-- This project needs to multi-target to net9.0 as well to avoid hitting NuGet Restore issues when package is restored from a net9+ project and avoid NU1605 downgrade errors. -->
5+
<TargetFrameworks>$(AllTargetFrameworks)</TargetFrameworks>
56
<IsPackable>true</IsPackable>
67
<PackageTags>$(ComponentAzurePackageTags) ai</PackageTags>
78
<Description>A client for Azure AI Inference SDK that integrates with Aspire, including logging and telemetry.</Description>

src/Components/Aspire.Azure.AI.OpenAI/Aspire.Azure.AI.OpenAI.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
4+
<!-- This project needs to multi-target to net9.0 as well to avoid hitting NuGet Restore issues when package is restored from a net9+ project and avoid NU1605 downgrade errors. -->
5+
<TargetFrameworks>$(AllTargetFrameworks)</TargetFrameworks>
56
<IsPackable>true</IsPackable>
67
<PackageTags>$(ComponentAzurePackageTags) ai openai</PackageTags>
78
<Description>A client for Azure OpenAI that integrates with Aspire, including logging and telemetry.</Description>

src/Components/Aspire.Microsoft.Data.SqlClient/Aspire.Microsoft.Data.SqlClient.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
4+
<!-- This project needs to multi-target to net9.0 as well to avoid hitting NuGet Restore issues when package is restored from a net9+ project and avoid NU1605 downgrade errors. -->
5+
<TargetFrameworks>$(AllTargetFrameworks)</TargetFrameworks>
56
<IsPackable>true</IsPackable>
67
<PackageTags>$(ComponentDatabasePackageTags) sqlserver sql</PackageTags>
78
<Description>A Microsoft SQL Server client that integrates with Aspire, including health checks, metrics and telemetry.</Description>

src/Components/Aspire.OpenAI/Aspire.OpenAI.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>$(DefaultTargetFramework)</TargetFramework>
4+
<!-- This project needs to multi-target to net9.0 as well to avoid hitting NuGet Restore issues when package is restored from a net9+ project and avoid NU1605 downgrade errors. -->
5+
<TargetFrameworks>$(AllTargetFrameworks)</TargetFrameworks>
56
<IsPackable>true</IsPackable>
67
<PackageTags>$(ComponentCommonPackageTags) ai openai</PackageTags>
78
<Description>A client for OpenAI that integrates with Aspire, including metrics and telemetry.</Description>

tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,18 @@
1515
<ProjectReference Include="..\..\src\Aspire.Hosting\Aspire.Hosting.csproj" />
1616
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.AppContainers\Aspire.Hosting.Azure.AppContainers.csproj" />
1717
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.ApplicationInsights\Aspire.Hosting.Azure.ApplicationInsights.csproj" />
18-
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.ApplicationInsights\Aspire.Hosting.Azure.ApplicationInsights.csproj" />
1918
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.CognitiveServices\Aspire.Hosting.Azure.CognitiveServices.csproj" />
2019
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.ContainerRegistry\Aspire.Hosting.Azure.ContainerRegistry.csproj" />
2120
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.CosmosDB\Aspire.Hosting.Azure.CosmosDB.csproj" />
2221
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.EventHubs\Aspire.Hosting.Azure.EventHubs.csproj" />
2322
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.Functions\Aspire.Hosting.Azure.Functions.csproj" />
2423
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.KeyVault\Aspire.Hosting.Azure.KeyVault.csproj" />
2524
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.OperationalInsights\Aspire.Hosting.Azure.OperationalInsights.csproj" />
26-
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.OperationalInsights\Aspire.Hosting.Azure.OperationalInsights.csproj" />
2725
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.PostgreSQL\Aspire.Hosting.Azure.PostgreSQL.csproj" />
2826
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.Redis\Aspire.Hosting.Azure.Redis.csproj" />
2927
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.Search\Aspire.Hosting.Azure.Search.csproj" />
30-
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.Search\Aspire.Hosting.Azure.Search.csproj" />
3128
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.ServiceBus\Aspire.Hosting.Azure.ServiceBus.csproj" />
3229
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.SignalR\Aspire.Hosting.Azure.SignalR.csproj" />
33-
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.SignalR\Aspire.Hosting.Azure.SignalR.csproj" />
34-
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.Sql\Aspire.Hosting.Azure.Sql.csproj" />
3530
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.Sql\Aspire.Hosting.Azure.Sql.csproj" />
3631
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.Storage\Aspire.Hosting.Azure.Storage.csproj" />
3732
<ProjectReference Include="..\..\src\Aspire.Hosting.Azure.WebPubSub\Aspire.Hosting.Azure.WebPubSub.csproj" />

0 commit comments

Comments
 (0)