Skip to content

Commit

Permalink
Added .NET 8.0 build target
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Dec 27, 2023
1 parent d991913 commit dc0693b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion doc/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pushd $PSScriptRoot

function Run-DotNet {
..\0install.ps1 run --batch --version 6.0.. https://apps.0install.net/dotnet/sdk.xml @args
..\0install.ps1 run --batch --version 8.0.. https://apps.0install.net/dotnet/sdk.xml @args
if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"}
}

Expand Down
6 changes: 3 additions & 3 deletions src/Sample/Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<AssemblyName>NanoByte.StructureEditor.Sample</AssemblyName>
<RootNamespace>NanoByte.StructureEditor.Sample</RootNamespace>
<TargetFrameworks>net48;net6.0-windows</TargetFrameworks>
<TargetFrameworks>net48;net8.0-windows</TargetFrameworks>
<UseWindowsForms>True</UseWindowsForms>
<OutputType>WinExe</OutputType>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
Expand All @@ -14,9 +14,9 @@
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildRuntimeType)'=='Core'">
<!-- .NET Core MSBuild does not support non-primitive resources (e.g., images) for .NET Framework -->
<TargetFrameworks>net6.0-windows</TargetFrameworks>
<TargetFrameworks>net8.0-windows</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net6.0-windows'">
<PropertyGroup Condition="'$(TargetFramework)'=='net8.0-windows'">
<!-- Run nullability analysis only on annotated frameworks -->
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
10 changes: 7 additions & 3 deletions src/StructureEditor.WinForms/StructureEditor.WinForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
<RootNamespace>NanoByte.StructureEditor.WinForms</RootNamespace>
<Description>WinForms controls for building split-screen editors for data structures</Description>
<PackageTags>WinForms;split-screen;editor;data structures</PackageTags>
<TargetFrameworks>net45;net6.0-windows</TargetFrameworks>
<TargetFrameworks>net45;net6.0-windows;net8.0-windows</TargetFrameworks>
<UseWindowsForms>True</UseWindowsForms>
<OutputPath>..\..\artifacts\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildRuntimeType)'=='Core'">
<!-- .NET Core MSBuild does not support non-primitive resources (e.g., images) for .NET Framework -->
<TargetFrameworks>net6.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0-windows;net8.0-windows</TargetFrameworks>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net6.0-windows'">
<PropertyGroup Condition="'$(TargetFramework)'=='net6.0-windows' Or '$(TargetFramework)'=='net8.0-windows'">
<!-- Run nullability analysis only on annotated frameworks -->
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down Expand Up @@ -43,6 +43,10 @@
<PackagePath>lib/net6.0-windows7.0</PackagePath>
<Pack>true</Pack>
</None>
<None Include="..\..\lib\ICSharpCode.TextEditor.*">
<PackagePath>lib/net8.0-windows7.0</PackagePath>
<Pack>true</Pack>
</None>
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/StructureEditor/StructureEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<RootNamespace>NanoByte.StructureEditor</RootNamespace>
<Description>UI-agnostic base logic for building split-screen editors for data structures</Description>
<PackageTags>split-screen;editor;data structures</PackageTags>
<TargetFrameworks>net45;net6.0</TargetFrameworks>
<TargetFrameworks>net45;net6.0;net8.0</TargetFrameworks>
<OutputPath>..\..\artifacts\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net6.0'">
<PropertyGroup Condition="'$(TargetFramework)'=='net6.0' Or '$(TargetFramework)'=='net8.0'">
<!-- Run nullability analysis only on annotated frameworks -->
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
<PropertyGroup>
<AssemblyName>NanoByte.StructureEditor.UnitTests</AssemblyName>
<RootNamespace>NanoByte.StructureEditor</RootNamespace>
<TargetFrameworks>net48;net6.0-windows</TargetFrameworks>
<TargetFrameworks>net48;net8.0-windows</TargetFrameworks>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<SignAssembly>False</SignAssembly>
<IsPackable>False</IsPackable>
<DeterministicSourcePaths>False</DeterministicSourcePaths>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildRuntimeType)'=='Core'">
<!-- .NET Core MSBuild does not support non-primitive resources (e.g., images) for .NET Framework -->
<TargetFrameworks>net6.0-windows</TargetFrameworks>
<TargetFrameworks>net8.0-windows</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework)=='net6.0-windows'">
<PropertyGroup Condition="$(TargetFramework)=='net8.0-windows'">
<!-- Run nullability analysis only on annotated frameworks -->
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function Find-MSBuild {
}

function Run-DotNet {
..\0install.ps1 run --batch --version 6.0.. https://apps.0install.net/dotnet/sdk.xml @args
..\0install.ps1 run --batch --version 8.0.. https://apps.0install.net/dotnet/sdk.xml @args
if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"}
}

Expand Down
2 changes: 1 addition & 1 deletion src/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pushd $PSScriptRoot

function Run-DotNet {
..\0install.ps1 run --batch --version 6.0..!6.1 https://apps.0install.net/dotnet/sdk.xml @args
..\0install.ps1 run --batch --version 8.0..!8.1 https://apps.0install.net/dotnet/sdk.xml @args
if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"}
}

Expand Down

0 comments on commit dc0693b

Please sign in to comment.