Skip to content

Commit

Permalink
Add net9.0 build targets (#4187)
Browse files Browse the repository at this point in the history
* #4172 Change build target to net462; drops support for modern .NET

* Change alpha to preview

* Remove commented code

* #3690 Add net9.0 build target

* #3690 Add net9.0 build target

* #3690 Target net9.0

* Fix typo

* #3690 Add net9.0 build targets
  • Loading branch information
rockfordlhotka authored Aug 28, 2024
1 parent 7d964df commit fff4f06
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: main

on:
push:
branches: [ main, v7.x, v8.x ]
branches: [ main, v7.x, v8.x, v9.x ]
paths: ['Source/**', '.github/workflows/**']
pull_request:
branches: [ main, v7.x, v8.x ]
branches: [ main, v7.x, v8.x, v9.x ]
paths: ['Source/**', '.github/workflows/**']

jobs:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0'
dotnet-version: '9.0'
include-prerelease: True

- name: Build
Expand Down
6 changes: 5 additions & 1 deletion Source/Csla.AspNetCore/Csla.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Directory.Package.props" />

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<AssemblyName>Csla.AspNetCore</AssemblyName>
<RootNamespace>Csla.AspNetCore</RootNamespace>
<PackageId>Csla.AspNetCore</PackageId>
Expand All @@ -19,6 +19,10 @@

<Import Project="..\Csla.Web.Mvc.Shared\Csla.Web.Mvc.Shared.projitems" Label="Shared" />

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.0-preview.7.24406.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.7" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Directory.Package.props" />

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<Product>CSLA .NET Blazor WebAssembly</Product>
<Description>UI helpers for using CSLA .NET business types with Blazor WebAssembly.</Description>
Expand All @@ -22,6 +22,10 @@
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0-preview.7.24406.2" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.7" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
Expand Down
7 changes: 6 additions & 1 deletion Source/Csla.Blazor/Csla.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Directory.Package.props" />

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<RazorLangVersion>3.0</RazorLangVersion>
<Product>CSLA .NET Blazor</Product>
<Description>UI helpers for using CSLA .NET business types with Blazor.</Description>
Expand All @@ -23,6 +23,11 @@
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="9.0.0-preview.7.24406.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.0-preview.7.24406.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.0-preview.7.24406.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.7" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Directory.Package.props" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net462</TargetFramework>
<RootNamespace>Csla.Data.SqlClient</RootNamespace>
<Product>CSLA .NET System.Data.SqlClient</Product>
<Description>CSLA .NET System.Data.SqlClient support.</Description>
Expand Down
2 changes: 1 addition & 1 deletion Source/Csla.Windows/Csla.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Directory.Package.props" />

<PropertyGroup>
<TargetFrameworks>net462;net8.0-windows</TargetFrameworks>
<TargetFrameworks>net462;net8.0-windows;net9.0-windows</TargetFrameworks>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyName>Csla.Windows</AssemblyName>
<RootNamespace>Csla.Windows</RootNamespace>
Expand Down
11 changes: 8 additions & 3 deletions Source/Csla.Xaml.Maui/Csla.Xaml.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<Import Project="..\Directory.Package.props" />

<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->

Expand All @@ -22,7 +22,12 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

<ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith(&quot;net9&quot;))">
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.0-preview.7.24407.4" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.0-preview.7.24407.4" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0-preview.7.24405.7" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith(&quot;net8&quot;))">
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.70" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.70" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
Expand Down
2 changes: 1 addition & 1 deletion Source/Csla.Xaml.Wpf/Csla.Xaml.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Directory.Package.props" />

<PropertyGroup>
<TargetFrameworks>net462;net8.0-windows</TargetFrameworks>
<TargetFrameworks>net462;net8.0-windows;net9.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<AssemblyName>Csla.Xaml</AssemblyName>
<RootNamespace>Csla.Xaml</RootNamespace>
Expand Down
11 changes: 10 additions & 1 deletion Source/Csla/Csla.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\Directory.Package.props" />

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net462;net472;net48;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462;net472;net48;net8.0;net9.0</TargetFrameworks>
<PackageId>Csla</PackageId>
<Product>CSLA .NET Core</Product>
<Description>CSLA .NET provides a home for your business logic. It is an application development framework that reduces the cost of building and maintaining applications. The framework enables developers to build an object-oriented business layer for their application that encapsulates all business, authorization and validation logic for the application.</Description>
Expand Down Expand Up @@ -60,6 +60,15 @@
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net9.0'">
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0-preview.7.24405.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.0-preview.7.24405.7" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0-preview.7.24405.7" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0-preview.7.24405.7" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.0-preview.7.24405.7" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0-preview.7.24405.7" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
Expand Down
7 changes: 0 additions & 7 deletions Source/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@
<PackageTags>CSLA;Business;Rules</PackageTags>
<Copyright>Copyright © 2002-$([System.DateTime]::Now.ToString('yyyy')) Marimer LLC</Copyright>
<Authors>Marimer LLC</Authors>
<!--<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageIcon>images\csla.png</PackageIcon>-->
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<NeutralLanguage>en-US</NeutralLanguage>
<DefaultLanguage>en-US</DefaultLanguage>
</PropertyGroup>

<!--<ItemGroup Condition="'$(IsPackable)'=='true' AND '$(PackageIcon)'!=''">
<None Include="$(MSBuildThisFileDirectory)..\Source\readme.md" Pack="true" PackagePath="\" />
<None Include="$(MSBuildThisFileDirectory)..\Support\Logos\csla.png" Link="csla.png" Pack="true" PackagePath="\images\csla.png" Visible="false" />
</ItemGroup>-->
</Project>
2 changes: 1 addition & 1 deletion Source/version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "9.0.0-alpha",
"version": "9.0.0-preview",
"publicReleaseRefSpec": [ "^refs/heads/main$" ]
}

0 comments on commit fff4f06

Please sign in to comment.