diff --git a/.github/workflows/mac_unit_test_ci.yml b/.github/workflows/mac_unit_test_ci.yml index 71e5c3c40ad..a915d0d2be5 100644 --- a/.github/workflows/mac_unit_test_ci.yml +++ b/.github/workflows/mac_unit_test_ci.yml @@ -13,5 +13,5 @@ jobs: - uses: actions/checkout@v4 - name: Build and test run: | - dotnet build -c Release + dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true dotnet test -c Release --no-restore --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml index 26af91e7515..0da6626d638 100644 --- a/.github/workflows/main_ci.yml +++ b/.github/workflows/main_ci.yml @@ -27,7 +27,7 @@ jobs: dotnet-version: '8.0.x' - name: Build run: | - dotnet build -c Release + dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true - name: Unit Tests run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj diff --git a/.github/workflows/pr_ci.yml b/.github/workflows/pr_ci.yml index be7f5702dc0..4e645136ff5 100644 --- a/.github/workflows/pr_ci.yml +++ b/.github/workflows/pr_ci.yml @@ -26,7 +26,7 @@ jobs: dotnet-version: '8.0.x' - name: Build run: | - dotnet build -c Release + dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true - name: Unit Tests run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj diff --git a/.github/workflows/preview_ci.yml b/.github/workflows/preview_ci.yml index fbfa1d9b46d..cc7910525ef 100644 --- a/.github/workflows/preview_ci.yml +++ b/.github/workflows/preview_ci.yml @@ -35,7 +35,7 @@ jobs: - name: Build if: steps.check-publish.outputs.should-publish == 'true' run: | - dotnet build -c Release + dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true - name: Unit Tests if: steps.check-publish.outputs.should-publish == 'true' run: | diff --git a/.github/workflows/release_ci.yml b/.github/workflows/release_ci.yml index 095376e81cb..6b9b440c45f 100644 --- a/.github/workflows/release_ci.yml +++ b/.github/workflows/release_ci.yml @@ -41,7 +41,7 @@ jobs: run: echo "BuildNumber=$(( $GITHUB_RUN_NUMBER + 15471 ))" >> $GITHUB_ENV - name: Build run: | - dotnet build -c Release -p:Version=${{ steps.get_version.outputs.VERSION }} + dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true -p:Version=${{ steps.get_version.outputs.VERSION }} - name: Unit Tests run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj diff --git a/Directory.Build.props b/Directory.Build.props index 235d562dc61..735e9c009c9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -33,7 +33,7 @@ $(NoWarn);CA1200 - + $(NoWarn);CA1711 @@ -54,7 +54,7 @@ $(NoWarn);CA1727 - + $(NoWarn);CA1861 diff --git a/src/OrchardCore.Build/OrchardCore.Commons.props b/src/OrchardCore.Build/OrchardCore.Commons.props index 1ddaaab5712..68598319ed7 100644 --- a/src/OrchardCore.Build/OrchardCore.Commons.props +++ b/src/OrchardCore.Build/OrchardCore.Commons.props @@ -7,7 +7,6 @@ 1.9.0 preview $(VersionSuffix)-$(BuildNumber) - true 612,618 true $(NoWarn);CS1591 diff --git a/src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj b/src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj index a5ac7fee774..8e43cc43852 100644 --- a/src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj +++ b/src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj @@ -7,7 +7,6 @@ $(CommonTargetFrameworks) - true 612,618 InProcess false diff --git a/src/Templates/OrchardCore.ProjectTemplates/OrchardCore.ProjectTemplates.csproj b/src/Templates/OrchardCore.ProjectTemplates/OrchardCore.ProjectTemplates.csproj index ba64f3403aa..b724dc147c1 100644 --- a/src/Templates/OrchardCore.ProjectTemplates/OrchardCore.ProjectTemplates.csproj +++ b/src/Templates/OrchardCore.ProjectTemplates/OrchardCore.ProjectTemplates.csproj @@ -15,7 +15,6 @@ This setting changes that so that the .template.config folder will be included. --> True - False Template - CS8021,CS2008,NU5128 + CS8021;CS2008;NU5128;CA1016