3333 echo "VERSION=$VERSION" >> "$GITHUB_ENV"
3434 echo "Extracted version: $VERSION"
3535
36+ - name : Remove NBGV to prevent version conflicts
37+ run : |
38+ sed -i '/<PackageReference Include="Nerdbank.GitVersioning"/,/<\/PackageReference>/d' Directory.Build.props
39+ echo "Directory.Build.props after NBGV removal:"
40+ cat Directory.Build.props
41+
3642 - name : Setup .NET
3743 uses : actions/setup-dotnet@v4
3844 with :
@@ -45,13 +51,13 @@ jobs:
4551 dotnet restore samples/AfterBlazorServerSide/AfterBlazorServerSide.csproj
4652
4753 - name : Build library
48- run : dotnet build src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj --configuration Release --no-restore -p:NerdbankGitVersioningEnabled=false -p: Version=${{ env.VERSION }}
54+ run : dotnet build src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj --configuration Release --no-restore -p:Version=${{ env.VERSION }}
4955
5056 - name : Build test project
51- run : dotnet build src/BlazorWebFormsComponents.Test/BlazorWebFormsComponents.Test.csproj --configuration Release --no-restore -p:NerdbankGitVersioningEnabled=false -p: Version=${{ env.VERSION }}
57+ run : dotnet build src/BlazorWebFormsComponents.Test/BlazorWebFormsComponents.Test.csproj --configuration Release --no-restore -p:Version=${{ env.VERSION }}
5258
5359 - name : Build server-side sample
54- run : dotnet build samples/AfterBlazorServerSide/AfterBlazorServerSide.csproj --configuration Release --no-restore -p:NerdbankGitVersioningEnabled=false -p: Version=${{ env.VERSION }}
60+ run : dotnet build samples/AfterBlazorServerSide/AfterBlazorServerSide.csproj --configuration Release --no-restore -p:Version=${{ env.VERSION }}
5561
5662 - name : Run tests
5763 run : dotnet test src/BlazorWebFormsComponents.Test/BlazorWebFormsComponents.Test.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx" --results-directory src/BlazorWebFormsComponents.Test/TestResults
@@ -95,6 +101,10 @@ jobs:
95101 echo "VERSION=$VERSION" >> "$GITHUB_ENV"
96102 echo "Extracted version: $VERSION"
97103
104+ - name : Remove NBGV to prevent version conflicts
105+ run : |
106+ sed -i '/<PackageReference Include="Nerdbank.GitVersioning"/,/<\/PackageReference>/d' Directory.Build.props
107+
98108 - name : Setup .NET
99109 uses : actions/setup-dotnet@v4
100110 with :
@@ -104,15 +114,15 @@ jobs:
104114 run : dotnet restore src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj
105115
106116 - name : Build
107- run : dotnet build src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj --configuration Release --no-restore -p:NerdbankGitVersioningEnabled=false -p: Version=${{ env.VERSION }}
117+ run : dotnet build src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj --configuration Release --no-restore -p:Version=${{ env.VERSION }}
108118
109119 - name : Run tests
110120 run : |
111121 dotnet restore src/BlazorWebFormsComponents.Test/BlazorWebFormsComponents.Test.csproj
112122 dotnet test src/BlazorWebFormsComponents.Test/BlazorWebFormsComponents.Test.csproj --configuration Release --verbosity normal
113123
114124 - name : Pack
115- run : dotnet pack src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj --configuration Release --no-build --output ./nupkg -p:NerdbankGitVersioningEnabled=false -p: PackageVersion=${{ env.VERSION }} -p:Version=${{ env.VERSION }}
125+ run : dotnet pack src/BlazorWebFormsComponents/BlazorWebFormsComponents.csproj --configuration Release --no-build --output ./nupkg -p:PackageVersion=${{ env.VERSION }} -p:Version=${{ env.VERSION }}
116126
117127 - name : Push to GitHub Packages
118128 run : dotnet nuget push ./nupkg/*.nupkg --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
0 commit comments