Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Fix deploy - azure pipelines (#563)

Krzysztof Pajakaa8f3775519a
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 0c63154f9..c9fcded0e 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -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>
\ No newline at end of file
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 3946ed296..3b38f1b02 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -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'
diff --git a/src/Aspire/Aspire.AppHost/Aspire.AppHost.csproj b/src/Aspire/Aspire.AppHost/Aspire.AppHost.csproj
index ffcf2a3ee..17a2cccee 100644
--- a/src/Aspire/Aspire.AppHost/Aspire.AppHost.csproj
+++ b/src/Aspire/Aspire.AppHost/Aspire.AppHost.csproj
@@ -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>
diff --git a/src/Web/Grand.Web.Common/Middleware/InstallUrlMiddleware.cs b/src/Web/Grand.Web.Common/Middleware/InstallUrlMiddleware.cs
index 0b3de7625..c31add90b 100644
--- a/src/Web/Grand.Web.Common/Middleware/InstallUrlMiddleware.cs
+++ b/src/Web/Grand.Web.Common/Middleware/InstallUrlMiddleware.cs
@@ -1,4 +1,6 @@
-using Grand.Data;
+#nullable enable
+
+using Grand.Data;
using Grand.Domain.Common;
using Grand.Infrastructure;
using Grand.Infrastructure.Caching;