Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce01781

Browse files
authored
Merge pull request #832 from CommunityToolkit/dev/net8.0
Add .NET 8 TFM to all projects and AOT annotations
2 parents 7b53ae2 + 32dbaed commit ce01781

File tree

44 files changed

+158
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+158
-121
lines changed

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</Choose>
2626

2727
<ItemGroup>
28-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.128" PrivateAssets="All" />
28+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" PrivateAssets="All" />
2929
</ItemGroup>
3030

3131
<Choose>
@@ -39,7 +39,7 @@
3939
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
4040
</PropertyGroup>
4141
<ItemGroup>
42-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
42+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
4343
</ItemGroup>
4444
</When>
4545
</Choose>

azure-pipelines.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ jobs:
3434

3535
# Test solution #
3636

37+
# Run .NET 8 unit tests
38+
- script: dotnet test --no-build -c $(Build.Configuration) -f net8.0 -l "trx;LogFileName=VSTestResults_net8.0.trx"
39+
displayName: Run .NET 8 unit tests
40+
3741
# Run .NET 7 unit tests
3842
- script: dotnet test --no-build -c $(Build.Configuration) -f net7.0 -l "trx;LogFileName=VSTestResults_net7.0.trx"
3943
displayName: Run .NET 7 unit tests

build/Community.Toolkit.Common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<PropertyGroup>
2222
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
23-
<LangVersion>11.0</LangVersion>
23+
<LangVersion>12.0</LangVersion>
2424
<Nullable>enable</Nullable>
2525

2626
<!--

build/Community.Toolkit.Common.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project>
22

33
<PropertyGroup>
4-
<!-- TODO: Dynamically generate Title if one wasn't set -->
54
<Title Condition="'$(Title)' == ''">$(Product) Asset</Title>
65
</PropertyGroup>
76

src/CommunityToolkit.Common/CommunityToolkit.Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/CommunityToolkit.Diagnostics/CommunityToolkit.Diagnostics.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/CommunityToolkit.HighPerformance/CommunityToolkit.HighPerformance.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/CommunityToolkit.HighPerformance/Extensions/NullableExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static ref T DangerousGetValueOrDefaultReference<T>(this ref T? value)
4848
/// <typeparam name="T">The type of the underlying value.</typeparam>
4949
/// <param name="value">The <see cref="Nullable{T}"/>.</param>
5050
/// <returns>A reference to the value of the input <see cref="Nullable{T}"/> instance, or a <see langword="null"/> <typeparamref name="T"/> reference.</returns>
51-
/// <remarks>The returned reference can be tested for <see langword="null"/> using <see cref="Unsafe.IsNullRef{T}(ref T)"/>.</remarks>
51+
/// <remarks>The returned reference can be tested for <see langword="null"/> using <see cref="Unsafe.IsNullRef"/>.</remarks>
5252
[MethodImpl(MethodImplOptions.AggressiveInlining)]
5353
public static unsafe ref T DangerousGetValueOrNullReference<T>(ref this T? value)
5454
where T : struct

src/CommunityToolkit.HighPerformance/Extensions/ReadOnlySpanExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public static ReadOnlySpan2D<T> AsSpan2D<T>(this ReadOnlySpan<T> span, int offse
213213
public static unsafe int IndexOf<T>(this ReadOnlySpan<T> span, in T value)
214214
{
215215
ref T r0 = ref MemoryMarshal.GetReference(span);
216-
ref T r1 = ref Unsafe.AsRef(value);
216+
ref T r1 = ref Unsafe.AsRef(in value);
217217
IntPtr byteOffset = Unsafe.ByteOffset(ref r0, ref r1);
218218

219219
nint elementOffset = byteOffset / (nint)(uint)sizeof(T);

src/CommunityToolkit.HighPerformance/Extensions/StreamExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public static unsafe void Write<T>(this Stream stream, in T value)
275275
where T : unmanaged
276276
{
277277
#if NETSTANDARD2_1_OR_GREATER
278-
ref T r0 = ref Unsafe.AsRef(value);
278+
ref T r0 = ref Unsafe.AsRef(in value);
279279
ref byte r1 = ref Unsafe.As<T, byte>(ref r0);
280280
int length = sizeof(T);
281281

0 commit comments

Comments
 (0)