Skip to content

Commit

Permalink
Upgrade to net462
Browse files Browse the repository at this point in the history
net461 hasn't been supported for over a year, this wasn't a realistic
example anymore.
  • Loading branch information
gabrielweyer committed Oct 14, 2023
1 parent b86f7c6 commit 61761da
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<PackageVersion Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageVersion Include="xunit" Version="2.5.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.3" Condition="'$(TargetFramework)' == 'net461'" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.1" Condition="'$(TargetFramework)' == 'net6.0'" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
</ItemGroup>
</Project>
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

| CI | Status | Platform(s) | Framework(s) | Test Framework(s) |
| --- | --- | --- | --- | --- |
| [AppVeyor](#appveyor) | [![Build Status][app-veyor-shield]][app-veyor] | `Windows` | `netstandard2.0`, `net461` | `net6.0`, `net461` |
| [AppVeyor](#appveyor) | [![Build Status][app-veyor-shield]][app-veyor] | `Windows` | `netstandard2.0`, `net462` | `net6.0`, `net462` |
| [Azure DevOps](#azure-devops) | [![Build Status][azure-devops-shield]][azure-devops] | `Linux` | `netstandard2.0` | `net6.0` |
| [CircleCI](#circleci) | [![Build Status][circle-ci-shield]][circle-ci] | `Docker`: `mcr.microsoft.com/dotnet/sdk:6.0-focal` | `netstandard2.0` | `net6.0` |
| [GitHub](#github) | [![Build Status][github-actions-shield]][github-actions] | `Windows` | `netstandard2.0`, `net461` | `net6.0`, `net461` |
| [GitHub](#github) | [![Build Status][github-actions-shield]][github-actions] | `Windows` | `netstandard2.0`, `net462` | `net6.0`, `net462` |

Demonstrates a basic build of a `.NET` `NuGet` package using [Cake][cake].

Expand All @@ -19,7 +19,7 @@ I tried to create a *somewhat* realistic scenario without writing too much code:
- The solution contains two projects which will be packed as `NuGet` packages.
- The `SuperLogic` project depends from `Logic` and when packing this project reference will be turned into a `NuGet` package reference (handled out of the box by `dotnet pack`).
- The `Logic` project references a `NuGet` package from [nuget.org][nuget-org] via a `PackageReference`, `dotnet pack` will turn this into a package reference.
- The projects target both `netstandard2.0` and `net461` so they can be used with the `.NET Framework` (`net461` and above).
- The projects target both `netstandard2.0` and `net462` so they can be used with the `.NET Framework` (`net462` and above).
- The solution contains a test project.
- Use [`SemVer`][semver] to version the `DLLs` and the `NuGet` packages.
- **Note**: `SemVer` is implemented via [`GitVersion`][git-version].
Expand Down
2 changes: 1 addition & 1 deletion src/ExtraLogic/ExtraLogic.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<AssemblyName>Contoso.Hello.ExtraLogic</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion src/Logic/Logic.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<AssemblyName>Contoso.Hello.Logic</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion src/SuperLogic/SuperLogic.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<AssemblyName>Contoso.Hello.SuperLogic</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion tests/HelloTests/HelloTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net461</TargetFrameworks>
<TargetFrameworks>net6.0;net462</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down

0 comments on commit 61761da

Please sign in to comment.