Skip to content

Commit

Permalink
Replaced .NET 5.0 with .NET 6.0 build target
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Dec 3, 2021
1 parent b4e9f79 commit 0ee5f3b
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push, pull_request]

jobs:
build:
runs-on: windows-latest
runs-on: windows-2022
steps:
# Prepare
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Take a look a the [sample project](src/Sample) for a more complete setup, includ

The source code is in [`src/`](src/), config for building the API documentation is in [`doc/`](doc/) and generated build artifacts are placed in `artifacts/`. The source code does not contain version numbers. Instead the version is determined during CI using [GitVersion](https://gitversion.net/).

To build install [Visual Studio 2019 v16.8 or newer](https://www.visualstudio.com/downloads/) and run `.\build.ps1`.
To build install [Visual Studio 2022 or newer](https://www.visualstudio.com/downloads/) and run `.\build.ps1`.

## Contributing

Expand Down
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

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;net5.0-windows</TargetFrameworks>
<TargetFrameworks>net48;net6.0-windows</TargetFrameworks>
<UseWindowsForms>True</UseWindowsForms>
<OutputPath>..\..\artifacts\$(Configuration)\</OutputPath>
<OutputType>WinExe</OutputType>
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>net5.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0-windows</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net5.0-windows'">
<PropertyGroup Condition="'$(TargetFramework)'=='net6.0-windows'">
<!-- Run nullability analysis only on annotated frameworks -->
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
12 changes: 4 additions & 8 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;net472;net5.0-windows</TargetFrameworks>
<TargetFrameworks>net45;net6.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>net5.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0-windows</TargetFrameworks>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='net5.0-windows'">
<PropertyGroup Condition="'$(TargetFramework)'=='net6.0-windows'">
<!-- Run nullability analysis only on annotated frameworks -->
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -40,11 +40,7 @@
<Pack>true</Pack>
</None>
<None Include="..\..\lib\ICSharpCode.TextEditor.*">
<PackagePath>lib/net472</PackagePath>
<Pack>true</Pack>
</None>
<None Include="..\..\lib\ICSharpCode.TextEditor.*">
<PackagePath>lib/net5.0-windows7.0</PackagePath>
<PackagePath>lib/net6.0-windows7.0</PackagePath>
<Pack>true</Pack>
</None>
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/StructureEditor/StructureEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<AssemblyName>NanoByte.StructureEditor</AssemblyName>
<RootNamespace>NanoByte.StructureEditor</RootNamespace>
<Description>Utility classes and data structures with an emphasis on integration with native Windows and Linux features, network and disk IO, advanced collections and undo/redo logic.</Description>
<TargetFrameworks>net45;net472;netstandard2.1;net5.0</TargetFrameworks>
<TargetFrameworks>net45;netstandard2.1</TargetFrameworks>
<OutputPath>..\..\artifacts\$(Configuration)\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.1' Or '$(TargetFramework)'=='net5.0'">
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.1'">
<!-- 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,16 +4,16 @@
<PropertyGroup>
<AssemblyName>NanoByte.StructureEditor.UnitTests</AssemblyName>
<RootNamespace>NanoByte.StructureEditor</RootNamespace>
<TargetFrameworks>net48;net5.0-windows</TargetFrameworks>
<TargetFrameworks>net48;net6.0-windows</TargetFrameworks>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<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>net5.0-windows</TargetFrameworks>
<TargetFrameworks>net6.0-windows</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework)=='net5.0-windows'">
<PropertyGroup Condition="$(TargetFramework)=='net6.0-windows'">
<!-- Run nullability analysis only on annotated frameworks -->
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions 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 5.0.. https://apps.0install.net/dotnet/sdk.xml @args
..\0install.ps1 run --batch --version 6.0.. https://apps.0install.net/dotnet/sdk.xml @args
if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"}
}

Expand All @@ -22,7 +22,7 @@ function Run-MSBuild {
. $msbuild @args
if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"}
} else {
Write-Warning "You need Visual Studio 2019 v16.8+ to perform a full build of this project"
Write-Warning "You need Visual Studio 2022 to perform a full build of this project"
Run-DotNet msbuild @args
}
}
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 5.0.. https://apps.0install.net/dotnet/sdk.xml @args
..\0install.ps1 run --batch --version 6.0.. https://apps.0install.net/dotnet/sdk.xml @args
if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"}
}

Expand Down

0 comments on commit 0ee5f3b

Please sign in to comment.