Skip to content

Commit

Permalink
Fix deploy - azure pipelines (#563)
Browse files Browse the repository at this point in the history
* Update .NET SDK to 9.0.x and add .NET Aspire install task
  • Loading branch information
KrzysztofPajak authored Jan 19, 2025
1 parent 9aa2ccc commit aa8f377
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 25 deletions.
2 changes: 2 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,7 @@
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.9.0" />
<PackageVersion Include="Aspire.Dashboard.Sdk.$(NETCoreSdkRuntimeIdentifier)" Version="9.0.0" />
<PackageVersion Include="Aspire.Hosting.Orchestration.$(NETCoreSdkRuntimeIdentifier)" Version="9.0.0" />
</ItemGroup>
</Project>
13 changes: 9 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,21 @@ resources:
services:
mongo: mongo

variables:
buildConfiguration: 'Release'

steps:
- task: UseDotNet@2
displayName: 'Install .NET Core SDK 9'
inputs:
version: '9.0.x'

- task: Install .NET Aspire workload
inputs:
inlineScript: |
dotnet workload install aspire
- task: Bash@3
displayName: Install .NET Aspire workload
inputs:
targetType: 'inline'
script: |
dotnet workload install aspire
- task: NuGetToolInstaller@1
displayName: 'Install NuGet >=6.3.0-0'
Expand Down
45 changes: 25 additions & 20 deletions src/Aspire/Aspire.AppHost/Aspire.AppHost.csproj
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0" />
<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireHost>true</IsAspireHost>
<UserSecretsId>bdc1e5b4-4475-44fc-851c-dd576ac2c123</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" />
<PackageReference Include="Aspire.Hosting.MongoDB" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Web\Grand.Web.Admin\Grand.Web.Admin.csproj" />
<ProjectReference Include="..\..\Web\Grand.Web.Vendor\Grand.Web.Vendor.csproj" />
<ProjectReference Include="..\..\Web\Grand.Web\Grand.Web.csproj" />
</ItemGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireHost>true</IsAspireHost>
<UserSecretsId>bdc1e5b4-4475-44fc-851c-dd576ac2c123</UserSecretsId>
</PropertyGroup>
<PropertyGroup>
<SkipAddAspireDefaultReferences>true</SkipAddAspireDefaultReferences>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" />
<PackageReference Include="Aspire.Hosting.MongoDB" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Aspire.Dashboard.Sdk.$(NETCoreSdkRuntimeIdentifier)" />
<PackageReference Include="Aspire.Hosting.Orchestration.$(NETCoreSdkRuntimeIdentifier)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Web\Grand.Web.Admin\Grand.Web.Admin.csproj" />
<ProjectReference Include="..\..\Web\Grand.Web.Vendor\Grand.Web.Vendor.csproj" />
<ProjectReference Include="..\..\Web\Grand.Web\Grand.Web.csproj" />
</ItemGroup>

</Project>
4 changes: 3 additions & 1 deletion src/Web/Grand.Web.Common/Middleware/InstallUrlMiddleware.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Grand.Data;
#nullable enable

using Grand.Data;
using Grand.Domain.Common;
using Grand.Infrastructure;
using Grand.Infrastructure.Caching;
Expand Down

0 comments on commit aa8f377

Please sign in to comment.