Skip to content

Commit e32530e

Browse files
committed
Upgrade to .NET 8.0 and PostSharp 2024.0.5.
1 parent 55202e4 commit e32530e

File tree

45 files changed

+109
-105
lines changed

Some content is hidden

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

45 files changed

+109
-105
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0" />
11-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0" PrivateAssets="all" />
12-
<PackageReference Include="PostSharp" Version="2023.0.3" />
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.2" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.2" PrivateAssets="all" />
12+
<PackageReference Include="PostSharp" Version="2024.0.5" />
1313
</ItemGroup>
1414

1515
</Project>

Diagnostics/PostSharp.Samples.Logging.Audit/PostSharp.Samples.Logging.Audit.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
</ItemGroup>
6565
<ItemGroup>
6666
<PackageReference Include="PostSharp">
67-
<Version>2023.0.3</Version>
67+
<Version>2024.0.5</Version>
6868
</PackageReference>
6969
<PackageReference Include="PostSharp.Patterns.Diagnostics">
70-
<Version>2023.0.3</Version>
70+
<Version>2024.0.5</Version>
7171
</PackageReference>
7272
<PackageReference Include="System.ValueTuple">
7373
<Version>4.5.0</Version>

Diagnostics/PostSharp.Samples.Logging.CommonLogging/PostSharp.Samples.Logging.CommonLogging.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@
5959
<Version>4.7.0</Version>
6060
</PackageReference>
6161
<PackageReference Include="PostSharp">
62-
<Version>2023.0.3</Version>
62+
<Version>2024.0.5</Version>
6363
</PackageReference>
6464
<PackageReference Include="PostSharp.Patterns.Diagnostics">
65-
<Version>2023.0.3</Version>
65+
<Version>2024.0.5</Version>
6666
</PackageReference>
6767
<PackageReference Include="PostSharp.Patterns.Diagnostics.CommonLogging">
68-
<Version>2023.0.3</Version>
68+
<Version>2024.0.5</Version>
6969
</PackageReference>
7070
<PackageReference Include="System.ValueTuple">
7171
<Version>4.5.0</Version>

Diagnostics/PostSharp.Samples.Logging.Console/PostSharp.Samples.Logging.Console.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@
5353
</ItemGroup>
5454
<ItemGroup>
5555
<PackageReference Include="PostSharp">
56-
<Version>2023.0.3</Version>
56+
<Version>2024.0.5</Version>
5757
</PackageReference>
5858
<PackageReference Include="PostSharp.Patterns.Diagnostics">
59-
<Version>2023.0.3</Version>
59+
<Version>2024.0.5</Version>
6060
</PackageReference>
6161
<PackageReference Include="System.ValueTuple">
6262
<Version>4.5.0</Version>

Diagnostics/PostSharp.Samples.Logging.CustomBackend.ServiceStack/PostSharp.Samples.Logging.CustomBackend.ServiceStack.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@
5757
</ItemGroup>
5858
<ItemGroup>
5959
<PackageReference Include="PostSharp">
60-
<Version>2023.0.3</Version>
60+
<Version>2024.0.5</Version>
6161
</PackageReference>
6262
<PackageReference Include="PostSharp.Patterns.Diagnostics">
63-
<Version>2023.0.3</Version>
63+
<Version>2024.0.5</Version>
6464
</PackageReference>
6565
<PackageReference Include="ServiceStack.Common">
6666
<Version>5.13.2</Version>

Diagnostics/PostSharp.Samples.Logging.Customization/PostSharp.Samples.Logging.Customization.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
</ItemGroup>
5959
<ItemGroup>
6060
<PackageReference Include="PostSharp">
61-
<Version>2023.0.3</Version>
61+
<Version>2024.0.5</Version>
6262
</PackageReference>
6363
<PackageReference Include="PostSharp.Patterns.Diagnostics">
64-
<Version>2023.0.3</Version>
64+
<Version>2024.0.5</Version>
6565
</PackageReference>
6666
<PackageReference Include="System.ValueTuple">
6767
<Version>4.5.0</Version>

Diagnostics/PostSharp.Samples.Logging.ElasticStack/ApplicationInsightsLib/ApplicationInsightsLib.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<Configurations>Debug;Release;Development</Configurations>
66
<Platforms>AnyCPU</Platforms>
77
</PropertyGroup>

Diagnostics/PostSharp.Samples.Logging.ElasticStack/ClientExample/PostSharp.Samples.Logging.Distributed.Client.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<Project>
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>7.3</LangVersion>
66
<Platforms>AnyCPU</Platforms>
77
<Configurations>Debug;Release;Development</Configurations>
88
<PostSharpBuild Condition="'$(Configuration)'=='Development'">Debug</PostSharpBuild>
99
</PropertyGroup>
1010
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
1111
<ItemGroup>
12-
<PackageReference Include="PostSharp.Patterns.Diagnostics.HttpClient" Version="2023.0.3" />
12+
<PackageReference Include="PostSharp.Patterns.Diagnostics.HttpClient" Version="2024.0.5" />
1313
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
1414
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
15-
<PackageReference Include="PostSharp.Patterns.Diagnostics" Version="2023.0.3" />
16-
<PackageReference Include="PostSharp.Patterns.Diagnostics.Serilog" Version="2023.0.3" />
15+
<PackageReference Include="PostSharp.Patterns.Diagnostics" Version="2024.0.5" />
16+
<PackageReference Include="PostSharp.Patterns.Diagnostics.Serilog" Version="2024.0.5" />
1717
<PackageReference Include="Serilog.Sinks.ElasticSearch" Version="8.4.1" />
1818
</ItemGroup>
1919
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

Diagnostics/PostSharp.Samples.Logging.ElasticStack/MicroserviceExample/PostSharp.Samples.Logging.Distributed.Service.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk.Web" />
33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>7.3</LangVersion>
66
<OutputType>Exe</OutputType>
77
<Configurations>Debug;Release;Development</Configurations>
@@ -14,9 +14,9 @@
1414
<ItemGroup>
1515
<PackageReference Include="Serilog.AspNetCore" Version="4.1.0" />
1616
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
17-
<PackageReference Include="PostSharp.Patterns.Diagnostics" Version="2023.0.3" />
18-
<PackageReference Include="PostSharp.Patterns.Diagnostics.Serilog" Version="2023.0.3" />
19-
<PackageReference Include="PostSharp.Patterns.Diagnostics.AspNetCore" Version="2023.0.3" />
17+
<PackageReference Include="PostSharp.Patterns.Diagnostics" Version="2024.0.5" />
18+
<PackageReference Include="PostSharp.Patterns.Diagnostics.Serilog" Version="2024.0.5" />
19+
<PackageReference Include="PostSharp.Patterns.Diagnostics.AspNetCore" Version="2024.0.5" />
2020
<PackageReference Include="Serilog.Sinks.ElasticSearch" Version="8.4.1" />
2121
</ItemGroup>
2222
<ItemGroup>

Diagnostics/PostSharp.Samples.Logging.ElmahIo/PostSharp.Samples.Logging.ElmahIo.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
88
<PackageReference Include="Elmah.Io.AspNetCore.Serilog">
99
<Version>4.0.10</Version>
1010
</PackageReference>
1111
<PackageReference Include="PostSharp.Patterns.Diagnostics">
12-
<Version>2023.0.3</Version>
12+
<Version>2024.0.5</Version>
1313
</PackageReference>
1414
<PackageReference Include="PostSharp.Patterns.Diagnostics.Serilog">
15-
<Version>2023.0.3</Version>
15+
<Version>2024.0.5</Version>
1616
</PackageReference>
1717
<PackageReference Include="Serilog.Sinks.ColoredConsole">
1818
<Version>3.0.1</Version>

Diagnostics/PostSharp.Samples.Logging.Etw.CustomSource/PostSharp.Samples.Logging.Etw.CustomSource.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454
</ItemGroup>
5555
<ItemGroup>
5656
<PackageReference Include="PostSharp">
57-
<Version>2023.0.3</Version>
57+
<Version>2024.0.5</Version>
5858
</PackageReference>
5959
<PackageReference Include="PostSharp.Patterns.Diagnostics">
60-
<Version>2023.0.3</Version>
60+
<Version>2024.0.5</Version>
6161
</PackageReference>
6262
<PackageReference Include="PostSharp.Patterns.Diagnostics.Tracing">
63-
<Version>2023.0.3</Version>
63+
<Version>2024.0.5</Version>
6464
</PackageReference>
6565
<PackageReference Include="System.ValueTuple">
6666
<Version>4.5.0</Version>

Diagnostics/PostSharp.Samples.Logging.Etw/PostSharp.Samples.Logging.Etw.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@
5353
</ItemGroup>
5454
<ItemGroup>
5555
<PackageReference Include="PostSharp">
56-
<Version>2023.0.3</Version>
56+
<Version>2024.0.5</Version>
5757
</PackageReference>
5858
<PackageReference Include="PostSharp.Patterns.Diagnostics">
59-
<Version>2023.0.3</Version>
59+
<Version>2024.0.5</Version>
6060
</PackageReference>
6161
<PackageReference Include="PostSharp.Patterns.Diagnostics.Tracing">
62-
<Version>2023.0.3</Version>
62+
<Version>2024.0.5</Version>
6363
</PackageReference>
6464
<PackageReference Include="System.ValueTuple">
6565
<Version>4.5.0</Version>

Diagnostics/PostSharp.Samples.Logging.Log4Net/PostSharp.Samples.Logging.Log4Net.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@
6161
<Version>2.0.13</Version>
6262
</PackageReference>
6363
<PackageReference Include="PostSharp">
64-
<Version>2023.0.3</Version>
64+
<Version>2024.0.5</Version>
6565
</PackageReference>
6666
<PackageReference Include="PostSharp.Patterns.Diagnostics">
67-
<Version>2023.0.3</Version>
67+
<Version>2024.0.5</Version>
6868
</PackageReference>
6969
<PackageReference Include="PostSharp.Patterns.Diagnostics.Log4Net">
70-
<Version>2023.0.3</Version>
70+
<Version>2024.0.5</Version>
7171
</PackageReference>
7272
<PackageReference Include="System.ValueTuple">
7373
<Version>4.5.0</Version>

Diagnostics/PostSharp.Samples.Logging.Loupe/PostSharp.Samples.Logging.Loupe.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
<Version>4.10.17</Version>
6565
</PackageReference>
6666
<PackageReference Include="PostSharp">
67-
<Version>2023.0.3</Version>
67+
<Version>2024.0.5</Version>
6868
</PackageReference>
6969
<PackageReference Include="PostSharp.Patterns.Diagnostics">
70-
<Version>2023.0.3</Version>
70+
<Version>2024.0.5</Version>
7171
</PackageReference>
7272
<PackageReference Include="System.ValueTuple">
7373
<Version>4.5.0</Version>

Diagnostics/PostSharp.Samples.Logging.NLog/PostSharp.Samples.Logging.NLog.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@
6161
<Version>4.7.12</Version>
6262
</PackageReference>
6363
<PackageReference Include="PostSharp">
64-
<Version>2023.0.3</Version>
64+
<Version>2024.0.5</Version>
6565
</PackageReference>
6666
<PackageReference Include="PostSharp.Patterns.Diagnostics">
67-
<Version>2023.0.3</Version>
67+
<Version>2024.0.5</Version>
6868
</PackageReference>
6969
<PackageReference Include="PostSharp.Patterns.Diagnostics.NLog">
70-
<Version>2023.0.3</Version>
70+
<Version>2024.0.5</Version>
7171
</PackageReference>
7272
<PackageReference Include="System.ValueTuple">
7373
<Version>4.5.0</Version>
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="PostSharp.Patterns.Diagnostics" Version="2023.0.3" />
9-
<PackageReference Include="PostSharp.Patterns.Diagnostics.AspNetCore" Version="2023.0.3" />
10-
<PackageReference Include="PostSharp.Patterns.Diagnostics.Configuration" Version="2023.0.3" />
8+
<PackageReference Include="PostSharp.Patterns.Diagnostics" Version="2024.0.5" />
9+
<PackageReference Include="PostSharp.Patterns.Diagnostics.AspNetCore" Version="2024.0.5" />
10+
<PackageReference Include="PostSharp.Patterns.Diagnostics.Configuration" Version="2024.0.5" />
1111
</ItemGroup>
1212

1313
</Project>

Diagnostics/PostSharp.Samples.Logging.Serilog/PostSharp.Samples.Logging.Serilog.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@
5353
</ItemGroup>
5454
<ItemGroup>
5555
<PackageReference Include="PostSharp">
56-
<Version>2023.0.3</Version>
56+
<Version>2024.0.5</Version>
5757
</PackageReference>
5858
<PackageReference Include="PostSharp.Patterns.Diagnostics">
59-
<Version>2023.0.3</Version>
59+
<Version>2024.0.5</Version>
6060
</PackageReference>
6161
<PackageReference Include="PostSharp.Patterns.Diagnostics.Serilog">
62-
<Version>2023.0.3</Version>
62+
<Version>2024.0.5</Version>
6363
</PackageReference>
6464
<PackageReference Include="Serilog">
6565
<Version>2.10.0</Version>

Framework/PostSharp.Samples.Authorization/Framework/AuthorizationAspect.cs

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using PostSharp.Aspects;
2+
using PostSharp.Serialization;
23
using System;
34
using System.Collections;
45
using System.Collections.Generic;
@@ -10,7 +11,7 @@ namespace PostSharp.Samples.Authorization.Framework
1011
/// <summary>
1112
/// Base class for <see cref="MethodAuthorizationAspect" /> and <see cref="LocationAuthorizationAspect" />.
1213
/// </summary>
13-
[Serializable]
14+
[PSerializable]
1415
public abstract class AuthorizationAspect : IAspect
1516
{
1617
[ThreadStatic] private static bool evaluatingPermissions;
@@ -152,7 +153,7 @@ internal void RequirePermission(MemberInfo member, OperationSemantic semantic, i
152153
}
153154

154155

155-
[Serializable]
156+
[PSerializable]
156157
private struct OperationPermission<T>
157158
{
158159
public OperationPermission(OperationSemantic semantic, int parameterIndex, T permission)
@@ -162,11 +163,11 @@ public OperationPermission(OperationSemantic semantic, int parameterIndex, T per
162163
ParameterIndex = parameterIndex;
163164
}
164165

165-
public OperationSemantic Semantic { get; }
166+
public OperationSemantic Semantic { get; private set; }
166167

167-
public int ParameterIndex { get; }
168+
public int ParameterIndex { get; private set; }
168169

169-
public T Permission { get; }
170+
public T Permission { get; private set; }
170171
}
171172
}
172173
}

Framework/PostSharp.Samples.Authorization/Framework/LocationAuthorizationAspect.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using PostSharp.Aspects;
22
using PostSharp.Aspects.Dependencies;
33
using PostSharp.Reflection;
4+
using PostSharp.Serialization;
45
using System;
56
using System.Reflection;
67

@@ -14,7 +15,7 @@ namespace PostSharp.Samples.Authorization.Framework
1415
/// Note that this aspect is not a custom attribute and cannot be applied directly to a field or a property. It is
1516
/// indirectly created by the <see cref="RequiresPermissionAttribute" /> aspect.
1617
/// </remarks>
17-
[Serializable]
18+
[PSerializable]
1819
[AspectTypeDependency(AspectDependencyAction.Commute, typeof(LocationAuthorizationAspect))]
1920
public class LocationAuthorizationAspect : AuthorizationAspect, ILocationInterceptionAspect
2021
{

Framework/PostSharp.Samples.Authorization/Framework/MethodAuthorizationAspect.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using PostSharp.Aspects;
22
using PostSharp.Aspects.Dependencies;
3+
using PostSharp.Serialization;
34
using System;
45
using System.Reflection;
56

@@ -12,7 +13,7 @@ namespace PostSharp.Samples.Authorization.Framework
1213
/// Note that this aspect is not a custom attribute and cannot be applied directly to a field or a property. It is
1314
/// indirectly created by the <see cref="RequiresPermissionAttribute" /> aspect.
1415
/// </remarks>
15-
[Serializable]
16+
[PSerializable]
1617
[AspectTypeDependency(AspectDependencyAction.Commute, typeof(MethodAuthorizationAspect))]
1718
public class MethodAuthorizationAspect : AuthorizationAspect, IOnMethodBoundaryAspect
1819
{

Framework/PostSharp.Samples.Authorization/Framework/RequiresPermissionAttribute.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
using PostSharp.Serialization;
2+
using System;
23

34
namespace PostSharp.Samples.Authorization.Framework
45
{
@@ -9,11 +10,11 @@ namespace PostSharp.Samples.Authorization.Framework
910
/// <see cref="RequiresPermissionBaseAttribute" /> class,
1011
/// which is limited to standard permissions or simple named permsissions.
1112
/// </summary>
12-
[Serializable]
13+
[PSerializable]
1314
public class RequiresPermissionAttribute : RequiresPermissionBaseAttribute
1415
{
15-
private readonly string _defaultPermission;
16-
private readonly string _writePermission;
16+
private string _defaultPermission;
17+
private string _writePermission;
1718

1819
/// <summary>
1920
/// Initializes a new <see cref="RequiresPermissionAttribute" /> with a single <see cref="StandardPermission" />. This

Framework/PostSharp.Samples.Authorization/Framework/RequiresPermissionBaseAttribute.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using PostSharp.Aspects;
22
using PostSharp.Extensibility;
3+
using PostSharp.Serialization;
34
using System;
45
using System.Collections.Generic;
56
using System.Linq;
@@ -13,7 +14,7 @@ namespace PostSharp.Samples.Authorization.Framework
1314
/// object.
1415
/// It could be used to implementation for instance parametric permissions.
1516
/// </summary>
16-
[Serializable]
17+
[PSerializable]
1718
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method | AttributeTargets.Parameter, AllowMultiple = true)]
1819
public abstract class RequiresPermissionBaseAttribute : Attribute, IPermissionFactory, IAspectProvider
1920
{

0 commit comments

Comments
 (0)