Skip to content

Commit

Permalink
Initial NET8 changes (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
LanceMcCarthy authored Nov 14, 2023
1 parent 7323634 commit 178f1f9
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 67 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main_build-blazor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: '8.0.x'

- name: Restore NuGet Packages
run: |
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: '8.0.x'

- name: Restore NuGet Packages
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main_build-console.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:


jobs:
# A job that builds a .NET Core console application using Telerik Document Processing Libraries
# A job that builds a .NET console application using Telerik Document Processing Libraries
# It uses a Windows runner and builds for Any CPU (remember: Linux file paths are case-sensitive!)
build_console:
runs-on: ubuntu-22.04
Expand All @@ -33,10 +33,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET Core SDK
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: '8.0.x'

# This example uses a NuGet Key instead of username and password, visit https://www.telerik.com/blogs/announcing-nuget-keys.
# You can use GitHub secret to store the key's value, here I am getting the secret from AKeyless using https:/marketplace/actions/akeyless-integrations
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/main_build-maui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
dotnet-quality: 'preview'

- uses: actions/setup-java@v3
with:
Expand All @@ -58,7 +57,7 @@ jobs:

- name: Build Maui Android project
shell: pwsh
run: dotnet build ${{ env.PROJECT_PATH }} -c Debug -f net7.0-android --no-restore -p:PublishTrimmed=False
run: dotnet build ${{ env.PROJECT_PATH }} -c Debug -f net8.0-android --no-restore -p:PublishTrimmed=False


# ***************************** #
Expand All @@ -76,7 +75,6 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
dotnet-quality: 'preview'

# For WinUI builds
- name: Add msbuild to PATH
Expand All @@ -100,7 +98,7 @@ jobs:

- name: Build Maui WinUI project
shell: pwsh
run: dotnet build ${{ env.PROJECT_PATH }} -c Debug -f net7.0-windows10.0.19041.0 -p:PublishTrimmed=False
run: dotnet build ${{ env.PROJECT_PATH }} -c Debug -f net8.0-windows10.0.19041.0 -p:PublishTrimmed=False


# ************************* #
Expand All @@ -122,7 +120,6 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
dotnet-quality: 'preview'

- name: Generate version number using date and run number
id: version-creator
Expand All @@ -144,7 +141,7 @@ jobs:

- name: Build MAUI iOS project
shell: bash
run: dotnet build ${{ env.PROJECT_PATH }} -c Debug -f net7.0-ios --no-restore -p:PublishTrimmed=True -p:MtouchLink=SdkOnly
run: dotnet build ${{ env.PROJECT_PATH }} -c Debug -f net8.0-ios --no-restore -p:PublishTrimmed=True -p:MtouchLink=SdkOnly


# ********************************* #
Expand All @@ -166,7 +163,6 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
dotnet-quality: 'preview'

- name: Generate version number using date and run number
id: version-creator
Expand All @@ -188,4 +184,4 @@ jobs:

- name: Build MAUI MacCatalyst project
shell: bash
run: dotnet build ${{ env.PROJECT_PATH }} -f net7.0-maccatalyst -c Debug --no-restore -p:PublishTrimmed=True -p:MtouchLink=SdkOnly
run: dotnet build ${{ env.PROJECT_PATH }} -f net8.0-maccatalyst -c Debug --no-restore -p:PublishTrimmed=True -p:MtouchLink=SdkOnly
2 changes: 1 addition & 1 deletion .github/workflows/main_build-winforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'

- name: Setup MSBuild.exe
uses: microsoft/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions src/Blazor/MyBlazorApp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Written by Lance McCarthy for use in Azure DevOps Classic Pipelines and GitHub Actions
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src/MyBlazorApp
COPY . .
RUN --mount=type=secret,id=telerik_username \
Expand Down
4 changes: 2 additions & 2 deletions src/Blazor/MyBlazorApp/MyBlazorApp.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<EnableSdkContainerSupport>true</EnableSdkContainerSupport>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Telerik.UI.for.Blazor" Version="4.6.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Console/MyDocProcApp/MyDocProcApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
24 changes: 19 additions & 5 deletions src/MAUI/MauiDemo/MauiDemo.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>MauiDemo</RootNamespace>
<UseMaui>true</UseMaui>
Expand All @@ -28,21 +28,35 @@
</PropertyGroup>

<ItemGroup>
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<AndroidResource Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<AndroidResource Include="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<AndroidResource Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />

<MauiFont Include="Resources\Fonts\*" />

<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
<MauiFont Remove="Resources\Fonts\OpenSans-Regular.ttf" />
<MauiFont Remove="Resources\Fonts\OpenSans-Semibold.ttf" />
</ItemGroup>

<ItemGroup>
<MauiImage Remove="Resources\Images\dotnet_bot.svg" />
</ItemGroup>

<ItemGroup>
<None Remove="Resources\Raw\msix_packaging_fundamentals_ebook.pdf" />
</ItemGroup>

<ItemGroup>
<AndroidResource Include="Resources\Fonts\OpenSans-Regular.ttf" />
<AndroidResource Include="Resources\Fonts\OpenSans-Semibold.ttf" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommonHelpers" Version="1.2.1" />
<PackageReference Include="Telerik.UI.for.Maui" Version="6.4.0" />
Expand Down
6 changes: 3 additions & 3 deletions src/Wpf/MyWpfApp/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>

</startup>
</configuration>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup>
</configuration>
3 changes: 2 additions & 1 deletion src/Wpf/MyWpfApp/MyWpfApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MyWpfApp</RootNamespace>
<AssemblyName>MyWpfApp</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
Expand Down
44 changes: 18 additions & 26 deletions src/Wpf/MyWpfApp/Properties/Resources.Designer.cs

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

22 changes: 9 additions & 13 deletions src/Wpf/MyWpfApp/Properties/Settings.Designer.cs

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

0 comments on commit 178f1f9

Please sign in to comment.