Open Closed

Issue deploying a single project of a tiered app using Github Actions and Webdeploy #8563


User avatar
0
chrisalves created

Hi,

I am trying to make the deployment of a single project (Alfa5.Blazor) of a tiered app on iis server in a virtual machine hosted in azure, using webdeploy and github actions to update automatically the files when a push was done.

The workflow that I configured is this:

name: Deploy to IIS using Web Deploy

on:
  push:
    branches:
      - main

jobs:
  build-and-deploy:
    runs-on: self-hosted

    steps:
    - name: Checkout code
      uses: actions/checkout@v3

    - name: Setup .NET
      uses: actions/setup-dotnet@v3
      with:
        dotnet-version: '9.0'
    
    - name: Remove ABP NuGet source if exists
      run: |
        dotnet nuget remove source ABP
        if ($?) { Write-Host "Source ABP removed." } else { Write-Host "Source ABP not found." }

    - name: Add ABP NuGet source
      run: dotnet nuget add source https://nuget.abp.io/***/v3/index.json --name ABP --username *** --password ***

    - name: Restore dependencies
      run: dotnet restore

    - name: Build project
      run: dotnet build --configuration Release --no-restore

    - name: Publish application
      run: dotnet publish -c Release -o ./publish

    - name: Deploy using Web Deploy
      run: |
        "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" `
        -verb:sync `
        -source:contentPath="./publish" `
        -dest:iisApp="webdeployblazor",wmsvc=***,username="***",password=***,authType=Basic `
        -allowUntrusted

The app is tiered, so the project needs project dependencies that are referred in another directories, above the root of the project. But i am deploying just a single project, so to get around this problema I create a directory named "projectDependencies" and imported the necessary dependencies to inside it.

Inicially was working, but when I finished the importations of the project dependencies an another error was called, about circular dependencies. I already checked if really was circular dependencies in the project but I couldn't find none.

I will show the dependencies next:

Alfa5.Blazor: <ItemGroup> <ProjectReference Include="projectDependencies/Alfa5.Blazor.Client.csproj" /> <ProjectReference Include="projectDependencies/Alfa5.HttpApi.Client.csproj" /> </ItemGroup>

Alfa5.Blazor.Client: <ItemGroup> <ProjectReference Include="Alfa5.HttpApi.Client.csproj" /> </ItemGroup>

Alfa5.HttpApi.Client: <ItemGroup> <ProjectReference Include="Alfa5.Application.Contracts.csproj" /> </ItemGroup>

Alfa5.Application.Contracts: <ItemGroup> <ProjectReference Include="Alfa5.Domain.Shared.csproj" /> </ItemGroup>

Alfa5.Domain.Shared: None

This made me think if there are another thing that I missed, of if its a problem caused about some abp package that are confliting or if this what i am doing is even possible. I am accepting any solutions, cause is just a test, the next step that i would try was to deploy the whole app when a push was done, identifying what changed and making the webdeploy, but it will be way more complicated.

  • ABP Framework version: v0.9.15
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
Run dotnet build --configuration Release --no-restore
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\Alfa5.Blazor.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp (= 0.17.1) but version AngleSharp 1.1.2 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\Alfa5.Blazor.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp.Css (= 0.17.0) but version AngleSharp.Css 1.0.0-beta.144 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Blazor.Client.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp (= 0.17.1) but version AngleSharp 1.1.2 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Blazor.Client.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp.Css (= 0.17.0) but version AngleSharp.Css 1.0.0-beta.144 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.HttpApi.Client.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp (= 0.17.1) but version AngleSharp 1.1.2 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.HttpApi.Client.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp.Css (= 0.17.0) but version AngleSharp.Css 1.0.0-beta.144 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Domain.Shared.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp (= 0.17.1) but version AngleSharp 1.1.2 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Domain.Shared.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp.Css (= 0.17.0) but version AngleSharp.Css 1.0.0-beta.144 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Application.Contracts.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp (= 0.17.1) but version AngleSharp 1.1.2 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Application.Contracts.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp.Css (= 0.17.0) but version AngleSharp.Css 1.0.0-beta.144 was resolved.
C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2132,5): error MSB4006: There is a circular dependency in the target dependency graph involving target "ResolveProjectReferences". [C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Application.Contracts.csproj]
C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2132,5): error MSB4006: There is a circular dependency in the target dependency graph involving target "ResolveProjectReferences". [C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Domain.Shared.csproj]

Build FAILED.

C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\Alfa5.Blazor.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp (= 0.17.1) but version AngleSharp 1.1.2 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\Alfa5.Blazor.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp.Css (= 0.17.0) but version AngleSharp.Css 1.0.0-beta.144 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Blazor.Client.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp (= 0.17.1) but version AngleSharp 1.1.2 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Blazor.Client.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp.Css (= 0.17.0) but version AngleSharp.Css 1.0.0-beta.144 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.HttpApi.Client.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp (= 0.17.1) but version AngleSharp 1.1.2 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.HttpApi.Client.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp.Css (= 0.17.0) but version AngleSharp.Css 1.0.0-beta.144 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Domain.Shared.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp (= 0.17.1) but version AngleSharp 1.1.2 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Domain.Shared.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp.Css (= 0.17.0) but version AngleSharp.Css 1.0.0-beta.144 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Application.Contracts.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp (= 0.17.1) but version AngleSharp 1.1.2 was resolved.
C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Application.Contracts.csproj : warning NU1608: Detected package version outside of dependency constraint: HtmlSanitizer 8.1.870 requires AngleSharp.Css (= 0.17.0) but version AngleSharp.Css 1.0.0-beta.144 was resolved.
C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2132,5): error MSB4006: There is a circular dependency in the target dependency graph involving target "ResolveProjectReferences". [C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Application.Contracts.csproj]
C:\Program Files\dotnet\sdk\9.0.101\Microsoft.Common.CurrentVersion.targets(2132,5): error MSB4006: There is a circular dependency in the target dependency graph involving target "ResolveProjectReferences". [C:\Users\opsadmin\actions-runner\_work\webdeploytest\webdeploytest\projectDependencies\Alfa5.Domain.Shared.csproj]
    10 Warning(s)
    2 Error(s)

Time Elapsed 00:00:02.45 Error: Process completed with exit code 1.

  • Steps to reproduce the issue: Configure the webdeploy, IIS and the website correctly; Configure the workflow; Make a change, and do a push on the project;

Thanks :)


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The Blazor project needs the code and modules HttpApi.Client packages from Alfa5.HttpApi.Client.

    It will be best if you clone the whole source code. Then, build in your pipeline.

    Thanks.

Made with ❤️ on ABP v9.1.0-preview. Updated on January 02, 2025, 07:06