Skip to content

Commit

Permalink
Downgrade to .NET 9.0 preview 6 (#21)
Browse files Browse the repository at this point in the history
* Downgrade to .NET 9.0 preview 6
  • Loading branch information
ondfisk authored Aug 25, 2024
1 parent e3ad299 commit 38cfbb1
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 15 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.100-preview.7.24407.12
dotnet-version: 9.0.100-preview.6.24328.19

- name: .NET Restore
run: dotnet restore
Expand All @@ -49,7 +49,7 @@ jobs:
run: dotnet publish src/MyApp/MyApp.csproj --no-build --configuration ${{ env.configuration }} --output app

- name: Zip Artifact
run: zip -r app.zip app
run: pushd app && zip -r ../app.zip . && popd

- name: Upload Artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -111,14 +111,12 @@ jobs:
chmod +x ./efbundle
# ./efbundle --connection "$CONNECTION_STRING"
- name: Deploy
id: deploy-to-webapp
uses: azure/webapps-deploy@v3
- name: Deploy Web App
uses: azure/cli@v2
with:
resource-group-name: ${{ vars.RESOURCE_GROUP }}
app-name: ${{ vars.WEBAPP }}
slot-name: ${{ vars.DEPLOYMENT_SLOT }}
package: app.zip
azcliversion: latest
inlineScript: |
az webapp deploy --resource-group ${{ vars.RESOURCE_GROUP }} --name ${{ vars.WEBAPP }} --slot ${{ vars.DEPLOYMENT_SLOT }} --src-path app.zip --clean
production:
name: Deploy to Production
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
uses: super-linter/super-linter@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_CSHARP: false # temporary workaround for linter not support .NET 9
VALIDATE_CSS: false
VALIDATE_CSS_PRETTIER: false
VALIDATE_JSCPD: false
Expand Down
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"healthz",
"MSSQL",
"outfile",
"popd",
"pushd",
"pwsh",
"resourcegroup",
"serverfarms",
Expand Down
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "9.0.100-preview.6.24328.19",
"rollForward": "latestFeature"
}
}
22 changes: 21 additions & 1 deletion infrastructure/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ resource webApp 'Microsoft.Web/sites@2023-12-01' = {
reserved: true
hyperV: false
siteConfig: {
linuxFxVersion: 'DOTNETCORE|8.0'
linuxFxVersion: 'DOTNETCORE|9.0'
alwaysOn: true
http20Enabled: true
minTlsVersion: '1.2'
scmMinTlsVersion: '1.2'
ftpsState: 'Disabled'
healthCheckPath: '/healthz'
httpLoggingEnabled: true
detailedErrorLoggingEnabled: true
}
httpsOnly: true
publicNetworkAccess: 'Enabled'
Expand All @@ -71,12 +73,30 @@ resource deploymentSlot 'Microsoft.Web/sites/slots@2023-12-01' = {
scmMinTlsVersion: '1.2'
ftpsState: 'Disabled'
healthCheckPath: '/healthz'
httpLoggingEnabled: true
detailedErrorLoggingEnabled: true
}
httpsOnly: true
publicNetworkAccess: 'Enabled'
}
}

resource webAppBasicPublishingCredentialsFtp 'Microsoft.Web/sites/basicPublishingCredentialsPolicies@2023-12-01' = {
name: 'ftp'
parent: webApp
properties: {
allow: false
}
}

resource slotBasicPublishingCredentialsFtp 'Microsoft.Web/sites/slots/basicPublishingCredentialsPolicies@2023-12-01' = {
name: 'ftp'
parent: deploymentSlot
properties: {
allow: false
}
}

resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2023-09-01' = {
name: logAnalyticsWorkspaceName
location: location
Expand Down
2 changes: 1 addition & 1 deletion src/MyApp/Migrations/20240824184034_Initial.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/MyApp/Migrations/AppDbContextModelSnapshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.0-preview.7.24405.3")
.HasAnnotation("ProductVersion", "9.0.0-preview.6.24327.4")
.HasAnnotation("Relational:MaxIdentifierLength", 128);

SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
Expand Down
5 changes: 3 additions & 2 deletions src/MyApp/MyApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.2.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.1" />
<PackageReference Include="Microsoft.EntityframeworkCore.Design" Version="9.0.0-preview.7.24405.3">
<PackageReference Include="Microsoft.EntityframeworkCore.Design" Version="9.0.0-preview.6.24327.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityframeworkCore.SqlServer" Version="9.0.0-preview.7.24405.3" />
<PackageReference Include="Microsoft.EntityframeworkCore.SqlServer" Version="9.0.0-preview.6.24327.4" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.64.0" />
<PackageReference Include="System.Drawing.Common" Version="8.0.8" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
Expand Down
5 changes: 5 additions & 0 deletions src/MyApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Azure.Monitor.OpenTelemetry.AspNetCore;
using Microsoft.EntityFrameworkCore;
using MyApp.Features;
using MyApp.Features.Movies;
Expand All @@ -6,6 +7,10 @@
var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
if (!builder.Environment.IsDevelopment())
{
builder.Services.AddOpenTelemetry().UseAzureMonitor();
}
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
builder.Services.AddHealthChecks();
Expand Down
2 changes: 1 addition & 1 deletion tests/MyApp.Tests/MyApp.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0-preview.7.24405.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0-preview.6.24327.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Testcontainers.MsSql" Version="3.9.0" />
<PackageReference Include="xunit" Version="2.9.0" />
Expand Down

0 comments on commit 38cfbb1

Please sign in to comment.