Skip to content

Commit b3d3baf

Browse files
authored
feat(infra): adjust dotnet framework version across projects #10236 (#10237)
1 parent 1f2c1ba commit b3d3baf

File tree

113 files changed

+1428
-1575
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+1428
-1575
lines changed

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"hostRequirements": {
44
"cpus": 4
55
},
6-
"onCreateCommand": "wget https://download.visualstudio.microsoft.com/download/pr/3606de37-1325-4f5f-bbe9-1bc44b3c1c7f/91872629e9f0c205cace9c462d5e89a4/dotnet-sdk-9.0.200-linux-x64.tar.gz -O $HOME/dotnet.tar.gz && export DOTNET_ROOT=$HOME/.dotnet && mkdir -p \"$DOTNET_ROOT\" && tar zxf $HOME/dotnet.tar.gz -C \"$DOTNET_ROOT\" && export PATH=$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH && find . -type f -name '*.csproj' -exec sed -i 's/Microsoft.NET.Sdk.BlazorWebAssembly/Microsoft.NET.Sdk.Web/g' {} \\;",
6+
"onCreateCommand": "wget https://download.visualstudio.microsoft.com/download/pr/82a7fc96-b53b-4af4-ac3a-ef0a6c9325d5/84e522c31482538cddf696d03c5b20af/dotnet-sdk-9.0.201-linux-x64.tar.gz -O $HOME/dotnet.tar.gz && export DOTNET_ROOT=$HOME/.dotnet && mkdir -p \"$DOTNET_ROOT\" && tar zxf $HOME/dotnet.tar.gz -C \"$DOTNET_ROOT\" && export PATH=$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH && find . -type f -name '*.csproj' -exec sed -i 's/Microsoft.NET.Sdk.BlazorWebAssembly/Microsoft.NET.Sdk.Web/g' {} \\;",
77
"waitFor": "onCreateCommand",
88
"customizations": {
99
"codespaces": {

.github/workflows/admin-sample.cd.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
cd src/Templates/Boilerplate && dotnet build -c Release
3636
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
3737
dotnet new install Bit.Boilerplate.0.0.0.nupkg
38-
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --module Admin --appInsights --sentry --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0
38+
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --module Admin --appInsights --sentry --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR
3939
4040
- name: Update core appsettings.json
4141
uses: devops-actions/[email protected]
@@ -90,7 +90,7 @@ jobs:
9090
cd src/Templates/Boilerplate && dotnet build -c Release
9191
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
9292
dotnet new install Bit.Boilerplate.0.0.0.nupkg
93-
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --module Admin --appInsights --sentry --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0
93+
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --module Admin --appInsights --sentry --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR
9494
9595
- name: Update core appsettings.json
9696
uses: devops-actions/[email protected]
@@ -188,7 +188,7 @@ jobs:
188188
cd src\Templates\Boilerplate && dotnet build -c Release
189189
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
190190
dotnet new install Bit.Boilerplate.0.0.0.nupkg
191-
cd ..\..\..\ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --module Admin --appInsights --sentry --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --captcha reCaptcha --signalR --framework net9.0
191+
cd ..\..\..\ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --module Admin --appInsights --sentry --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --captcha reCaptcha --signalR
192192
193193
- name: Update core appsettings.json
194194
uses: devops-actions/[email protected]
@@ -237,7 +237,7 @@ jobs:
237237
cd src/Templates/Boilerplate && dotnet build -c Release
238238
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
239239
dotnet new install Bit.Boilerplate.0.0.0.nupkg
240-
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --module Admin --appInsights --sentry --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0
240+
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --module Admin --appInsights --sentry --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR
241241
242242
- uses: actions/setup-node@v4
243243
with:
@@ -315,7 +315,7 @@ jobs:
315315
cd src/Templates/Boilerplate && dotnet build -c Release
316316
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
317317
dotnet new install Bit.Boilerplate.0.0.0.nupkg
318-
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --module Admin --appInsights --sentry --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0
318+
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --module Admin --appInsights --sentry --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR
319319
320320
- name: Update core appsettings.json
321321
uses: devops-actions/[email protected]

.github/workflows/bit.full.ci.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
id: simple-test
6161
continue-on-error: true
6262
run: |
63-
dotnet new bit-bp --name SimpleTest --database Sqlite --framework net8.0
63+
dotnet new bit-bp --name SimpleTest --database Sqlite
6464
cd SimpleTest/src/Server/SimpleTest.Server.Api/
6565
dotnet tool restore
6666
dotnet ef migrations add InitialMigration --verbose
@@ -82,7 +82,7 @@ jobs:
8282
id: sqlite-test
8383
continue-on-error: true
8484
run: |
85-
dotnet new bit-bp --name TestSqlite --database Sqlite --advancedTests --framework net9.0
85+
dotnet new bit-bp --name TestSqlite --database Sqlite --advancedTests
8686
cd TestSqlite/src/Server/TestSqlite.Server.Api/
8787
dotnet tool restore
8888
dotnet ef migrations add InitialMigration --verbose
@@ -105,7 +105,7 @@ jobs:
105105
id: sqlserver-test
106106
continue-on-error: true
107107
run: |
108-
dotnet new bit-bp --name TestSqlServer --database SqlServer --advancedTests --framework net8.0
108+
dotnet new bit-bp --name TestSqlServer --database SqlServer --advancedTests
109109
cd TestSqlServer/src/Server/TestSqlServer.Server.Api/
110110
dotnet tool restore
111111
dotnet ef migrations add InitialMigration --verbose
@@ -126,7 +126,7 @@ jobs:
126126
id: multilingual-disabled-test
127127
continue-on-error: true
128128
run: |
129-
dotnet new bit-bp --name MultilingualDisabled --database Sqlite --advancedTests --framework net8.0
129+
dotnet new bit-bp --name MultilingualDisabled --database Sqlite --advancedTests
130130
cd MultilingualDisabled/src/Server/MultilingualDisabled.Server.Api/
131131
dotnet tool restore
132132
dotnet ef migrations add InitialMigration --verbose
@@ -145,17 +145,17 @@ jobs:
145145
- name: Test PostgreSQL, MySql, Other database options
146146
continue-on-error: true
147147
run: |
148-
dotnet new bit-bp --name TestPostgreSQL --database PostgreSQL --framework net8.0 --module Sales --signalR
148+
dotnet new bit-bp --name TestPostgreSQL --database PostgreSQL --module Sales --signalR
149149
cd TestPostgreSQL/src/Server/TestPostgreSQL.Server.Web/
150150
dotnet build
151151
cd ../../../../
152152
rm -r "TestPostgreSQL"
153-
dotnet new bit-bp --name TestMySql --database MySql --framework net8.0 --module Admin --offlineDb
153+
dotnet new bit-bp --name TestMySql --database MySql --module Admin --offlineDb
154154
cd TestMySql/src/Server/TestMySql.Server.Web/
155155
dotnet build
156156
cd ../../../../
157157
rm -r "TestMySql"
158-
dotnet new bit-bp --name TestOther --database Other --framework net9.0 --sample --sentry
158+
dotnet new bit-bp --name TestOther --database Other --sample --sentry
159159
cd TestOther/src/Server/TestOther.Server.Web/
160160
dotnet build
161161
cd ../../../../
@@ -164,12 +164,12 @@ jobs:
164164
- name: Test file storage options
165165
continue-on-error: true
166166
run: |
167-
dotnet new bit-bp --name TestLocal --filesStorage Local --framework net8.0 --appInsights
167+
dotnet new bit-bp --name TestLocal --filesStorage Local --appInsights
168168
cd TestLocal/src/Server/TestLocal.Server.Web/
169169
dotnet build
170170
cd ../../../../
171171
rm -r "TestLocal"
172-
dotnet new bit-bp --name TestAzureBlobStorage --filesStorage AzureBlobStorage --framework net9.0 --captcha reCaptcha --notification
172+
dotnet new bit-bp --name TestAzureBlobStorage --filesStorage AzureBlobStorage --captcha reCaptcha --notification
173173
cd TestAzureBlobStorage/src/Server/TestAzureBlobStorage.Server.Web/
174174
dotnet build
175175
cd ../../../../
@@ -178,15 +178,15 @@ jobs:
178178
- name: Test backend setup options
179179
continue-on-error: true
180180
run: |
181-
dotnet new bit-bp --name TestStandalone --api Standalone --framework net8.0
181+
dotnet new bit-bp --name TestStandalone --api Standalone
182182
cd TestStandalone/src/Server/TestStandalone.Server.Api/
183183
dotnet build
184184
cd ../
185185
cd TestStandalone.Server.Web/
186186
dotnet build
187187
cd ../../../../
188188
rm -r "TestStandalone"
189-
dotnet new bit-bp --name TestIntegrated --api Integrated --framework net9.0
189+
dotnet new bit-bp --name TestIntegrated --api Integrated
190190
cd TestIntegrated/src/Server/TestIntegrated.Server.Web/
191191
dotnet build
192192
cd ../../../../
@@ -195,14 +195,14 @@ jobs:
195195
- name: Test sample configuration 1
196196
continue-on-error: true
197197
run: |
198-
dotnet new bit-bp --name TestProject --database SqlServer --filesStorage AzureBlobStorage --api Integrated --captcha reCaptcha --pipeline Azure --module Admin --offlineDb --appInsights --sentry --signalR --notification --cloudflare --framework net9.0
198+
dotnet new bit-bp --name TestProject --database SqlServer --filesStorage AzureBlobStorage --api Integrated --captcha reCaptcha --pipeline Azure --module Admin --offlineDb --appInsights --sentry --signalR --notification --cloudflare
199199
dotnet build TestProject/TestProject.sln -p:MultilingualEnabled=true -p:Environment=Staging
200200
rm -r "TestProject"
201201
202202
- name: Test sample configuration 2
203203
continue-on-error: true
204204
run: |
205-
dotnet new bit-bp --name TestProject2 --database Other --filesStorage Other --api Standalone --captcha None --pipeline None --module None --offlineDb false --appInsights false --sentry false --signalR false --notification false --cloudflare false --framework net8.0
205+
dotnet new bit-bp --name TestProject2 --database Other --filesStorage Other --api Standalone --captcha None --pipeline None --module None --offlineDb false --appInsights false --sentry false --signalR false --notification false --cloudflare false
206206
dotnet build TestProject2/TestProject2.sln -p:MultilingualEnabled=false -p:Environment=Development
207207
rm -r "TestProject2"
208208

.github/workflows/nuget.org.yml

+27
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,27 @@ jobs:
4444
fileName: 'AssemblyOriginatorKeyFile.snk'
4545
encodedString: ${{ secrets.STRONG_SIGN_CERTIFICATE_BASE64 }}
4646

47+
- name: Generate ES2019 based blazor.*.js files
48+
run: |
49+
git clone https://github.com/dotnet/aspnetcore.git
50+
cd aspnetcore
51+
git switch release/9.0
52+
git submodule update --init --recursive
53+
sed -i 's/ES2022/ES2019/g' src/Components/Shared.JS/tsconfig.json
54+
./restore.sh
55+
npm run-script build
56+
cd src/Components/
57+
./build.sh
58+
cd Web.JS
59+
npm run-script build:production
60+
cd ../../../../
61+
cp aspnetcore/src/Components/Web.JS/dist/Release/blazor.*.js src/BlazorES2019/Bit.BlazorES2019/wwwroot/
62+
63+
- name: dotnet pack BlazorES2019
64+
run: |
65+
dotnet build src/BlazorES2019/Bit.BlazorES2019/Bit.BlazorES2019.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
66+
dotnet pack src/BlazorES2019/Bit.BlazorES2019/Bit.BlazorES2019.csproj --output . --configuration Release
67+
4768
- name: Generate CSS/JS files BlazorUI
4869
run: dotnet build src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj -t:BeforeBuildTasks --no-restore -f:net9.0 -c Release
4970
- name: dotnet build BlazorUI
@@ -112,5 +133,11 @@ jobs:
112133
- name: dotnet pack BlazorEmpty
113134
run: dotnet pack src/Templates/BlazorEmpty/Bit.BlazorEmpty.ProjectTemplate.csproj --output . --configuration Release
114135

136+
- name: Upload artifact
137+
uses: actions/upload-artifact@v4
138+
with:
139+
name: nupkg-files
140+
path: ./*.nupkg
141+
115142
- name: dotnet nuget push
116143
run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_ORG_API_KEY}} --skip-duplicate

.github/workflows/prerelease.nuget.org.yml

+27
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,27 @@ jobs:
3434
fileName: 'AssemblyOriginatorKeyFile.snk'
3535
encodedString: ${{ secrets.STRONG_SIGN_CERTIFICATE_BASE64 }}
3636

37+
- name: Generate ES2019 based blazor.*.js files
38+
run: |
39+
git clone https://github.com/dotnet/aspnetcore.git
40+
cd aspnetcore
41+
git switch release/9.0
42+
git submodule update --init --recursive
43+
sed -i 's/ES2022/ES2019/g' src/Components/Shared.JS/tsconfig.json
44+
./restore.sh
45+
npm run-script build
46+
cd src/Components/
47+
./build.sh
48+
cd Web.JS
49+
npm run-script build:production
50+
cd ../../../../
51+
cp aspnetcore/src/Components/Web.JS/dist/Release/blazor.*.js src/BlazorES2019/Bit.BlazorES2019/wwwroot/
52+
53+
- name: dotnet pack BlazorES2019
54+
run: |
55+
dotnet build src/BlazorES2019/Bit.BlazorES2019/Bit.BlazorES2019.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
56+
dotnet pack src/BlazorES2019/Bit.BlazorES2019/Bit.BlazorES2019.csproj --output . --configuration Release
57+
3758
- name: Generate CSS/JS files BlazorUI
3859
run: dotnet build src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj -t:BeforeBuildTasks --no-restore -f:net9.0 -c Release
3960
- name: dotnet build BlazorUI
@@ -102,5 +123,11 @@ jobs:
102123
- name: dotnet pack BlazorEmpty
103124
run: dotnet pack src/Templates/BlazorEmpty/Bit.BlazorEmpty.ProjectTemplate.csproj --output . --configuration Release
104125

126+
- name: Upload artifact
127+
uses: actions/upload-artifact@v4
128+
with:
129+
name: nupkg-files
130+
path: ./*.nupkg
131+
105132
- name: dotnet nuget push
106133
run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_ORG_API_KEY}} --skip-duplicate

.github/workflows/sales-module-demo.cd.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
cd src/Templates/Boilerplate && dotnet build -c Release
3939
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
4040
dotnet new install Bit.Boilerplate.0.0.0.nupkg
41-
cd ../../../ && dotnet new bit-bp --name SalesModule --database PostgreSQL --module Sales --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --framework net9.0
41+
cd ../../../ && dotnet new bit-bp --name SalesModule --database PostgreSQL --module Sales --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha
4242
4343
- name: Update core appsettings.json
4444
uses: devops-actions/[email protected]
@@ -141,7 +141,7 @@ jobs:
141141
cd src\Templates\Boilerplate && dotnet build -c Release
142142
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
143143
dotnet new install Bit.Boilerplate.0.0.0.nupkg
144-
cd ..\..\..\ && dotnet new bit-bp --name SalesModule --database PostgreSQL --module Sales --appInsights --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --captcha reCaptcha --framework net9.0
144+
cd ..\..\..\ && dotnet new bit-bp --name SalesModule --database PostgreSQL --module Sales --appInsights --apiServerUrl ${{ env.SERVER_ADDRESS }} --webAppUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --captcha reCaptcha
145145
146146
- name: Update core appsettings.json
147147
uses: devops-actions/[email protected]

0 commit comments

Comments
 (0)