Open Closed

CI/CD with GitHub Actions #9589


User avatar
0
LiSong created

I want to set up CI/CD with GitHub Actions to deploy your Web and public.web apps to Azure App Services, I am currently using VS publish.

and I had an old one set up before and I found some errors:

un dotnet build src/Tapp.Web/Tapp.Web.csproj --configuration Release Determining projects to restore... D:\a\tapp-9\tapp-9\src\Tapp.Domain\Tapp.Domain.csproj : warning NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageReference' items are: Volo.Saas.Domain 9.1.0, Volo.Saas.Domain 9.1.0. D:\a\tapp-9\tapp-9\src\Tapp.HttpApi\Tapp.HttpApi.csproj : error NU1101: Unable to find package Volo.Abp.Identity.Pro.HttpApi. No packages exist with this id in source(s): nuget.org. PackageSourceMapping is enabled, the following source(s) were not considered: ABP Commerc ..... following source(s) were not considered: ABP Commercial NuGet Source, Microsoft Visual Studio Offline Packages. D:\a\tapp-9\tapp-9\src\Tapp.Web\Tapp.Web.csproj : error NU1101: Unable to find package Volo.Abp.LanguageManagement.Domain.Shared. No packages exist with this id in source(s): nuget.org. PackageSourceMapping is enabled, the following source(s) were not considered: ABP Commercial NuGet Source, Microsoft Visual Studio Offline Packages. D:\a\tapp-9\tapp-9\src\Tapp.Web\Tapp.Web.csproj : error NU1101: Unable to find package Volo.FileManagement.Domain.Shared. No packages exist with this id in source(s): nuget.org. PackageSourceMapping is enabled, the following source(s) were not considered: ABP Commercial NuGet Source, Microsoft Visual Studio Offline Packages. D:\a\tapp-9\tapp-9\src\Tapp.Web\Tapp.Web.csproj : error NU1101: Unable to find package Volo.Saas.Domain.Shared. No packages exist with this id in source(s): nuget.org. PackageSourceMapping is enabled, the following source(s) were not considered: ABP Commercial NuGet Source, Microsoft Visual Studio Offline Packages. D:\a\tapp-9\tapp-9\src\Tapp.Web\Tapp.Web.csproj : error NU1101: Unable to find package Volo.Abp.TextTemplateManagement.Domain.Shared. No packages exist with this id in source(s): nuget.org. PackageSourceMapping is enabled, the following source(s) were not considered: ABP Commercial NuGet Source, Microsoft Visual Studio Offline Packages. D:\a\tapp-9\tapp-9\src\Tapp.Web\Tapp.Web.csproj : error NU1101: Unable to find package Volo.Abp.Gdpr.Domain.Shared. No packages exist with this id in source(s): nuget.org. PackageSourceMapping is enabled, the following source(s) were not considered: ABP Commercial NuGet Source, Microsoft Visual Studio Offline Packages. D:\a\tapp-9\tapp-9\src\Tapp.Web\Tapp.Web.csproj : error NU1101: Unable to find package Volo.CmsKit.Pro.Domain.Shared. No packages exist with this id in source(s): nuget.org. PackageSourceMapping is enabled, the following source(s) were not considered: ABP Commercial NuGet Source, Microsoft Visual Studio Offline Packages. 2 Warning(s) 529 Error(s)


2 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    To set up CI/CD with GitHub Actions for deploying your ABP-based Web and public.web apps to Azure App Services, and to resolve the package restore errors you encountered, follow these steps:

    1. Ensure Your NuGet Sources Are Correct
    • ABP Commercial packages (like Volo.Abp.Identity.Pro.HttpApi, Volo.Saas.Domain, etc.) are not available on nuget.org. You must add your ABP Commercial NuGet source (https://nuget.abp.io/...) with your license key in your NuGet.config.
    • Example NuGet.config:
      <?xml version="1.0" encoding="utf-8"?>
      <configuration>
        <packageSources>
          <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
          <add key="abp-commercial" value="https://nuget.abp.io/[YOUR_ORG_ID]/v3/index.json" />
        </packageSources>
        <packageSourceCredentials>
          <abp-commercial>
            <add key="Username" value="your-email@example.com" />
            <add key="ClearTextPassword" value="[YOUR_ABP_LICENSE_KEY]" />
          </abp-commercial>
        </packageSourceCredentials>
      </configuration>
      
    • Make sure this file is present in your repository root and referenced in your GitHub Actions workflow.
    1. Remove Duplicate PackageReferences
    • Edit your .csproj files to remove any duplicate <PackageReference> entries, especially for Volo.Saas.Domain.
    1. Example GitHub Actions Workflow for ABP + Azure App Service
    • Place this in .github/workflows/azure-webapp.yml:
      name: Build and deploy ASP.Net Core app to Azure Web App
      
      on:
        push:
          branches:
            - main
        workflow_dispatch:
      
      jobs:
        build:
          runs-on: ubuntu-latest
          steps:
            - uses: actions/checkout@v4
      
            - name: Setup .NET
              uses: actions/setup-dotnet@v4
              with:
                dotnet-version: '9.x'
                include-prerelease: true
      
            - name: Restore dependencies
              run: dotnet restore src/Tapp.Web/Tapp.Web.csproj --configfile NuGet.config
      
            - name: Build
              run: dotnet build src/Tapp.Web/Tapp.Web.csproj --configuration Release --no-restore
      
            - name: Publish
              run: dotnet publish src/Tapp.Web/Tapp.Web.csproj --configuration Release --output ./publish --no-build
      
            - name: Upload artifact
              uses: actions/upload-artifact@v4
              with:
                name: webapp
                path: ./publish
      
        deploy:
          runs-on: ubuntu-latest
          needs: build
          steps:
            - name: Download artifact
              uses: actions/download-artifact@v4
              with:
                name: webapp
                path: ./publish
      
            - name: Deploy to Azure Web App
              uses: azure/webapps-deploy@v3
              with:
                app-name: '<YOUR_AZURE_APP_NAME>'
                publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE }}
                package: ./publish
      
    • Store your Azure publish profile as a GitHub secret named AZUREAPPSERVICE_PUBLISHPROFILE.
    1. Troubleshooting
    • If you see errors like "Unable to find package ...", double-check your NuGet.config and ensure your ABP Commercial source and credentials are correct.
    • For duplicate package warnings, clean up your .csproj files.
    1. Reference
    • Full step-by-step guide:
      • https://abp.io/docs/latest/solution-templates/layered-web-application/deployment/azure-deployment/step3-deployment-github-action

    This setup will enable automated CI/CD for your ABP Web apps with proper package restore and deployment to Azure App Service.

    Sources:

    • https://abp.io/docs/latest/solution-templates/layered-web-application/deployment/azure-deployment/step3-deployment-github-action

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you update your Nuget.Config file to remove the packageSourceMapping sections?

    Thanks.

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 10, 2025, 06:30