Skip to content

Commit dd888d3

Browse files
committed
Fix DI incompatibility
1 parent 5095912 commit dd888d3

File tree

3 files changed

+35
-54
lines changed

3 files changed

+35
-54
lines changed

src/EasySign.Cli/EasySign.Cli.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,14 @@
3131
<PackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" PrivateAssets="All" />
3232
<PackageReference Include="Serilog" Version="4.2.0" />
3333
<PackageReference Include="Serilog.Enrichers.Thread" Version="4.0.0" />
34-
<PackageReference Include="Serilog.Extensions.Logging" Version="9.0.1" />
34+
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
3535
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
3636
</ItemGroup>
3737

38+
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
39+
<PackageReference Update="Serilog.Extensions.Logging" Version="9.0.1" />
40+
</ItemGroup>
41+
3842
<ItemGroup>
3943
<None Include="README.md">
4044
<Pack>True</Pack>

src/EasySign.Cli/Program.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ namespace SAPTeam.EasySign.Cli
1717
{
1818
internal class Program
1919
{
20-
public static Serilog.ILogger Logger { get; private set; }
21-
2220
static int Main(string[] args)
2321
{
2422
Log.Logger = new LoggerConfiguration()
@@ -31,8 +29,8 @@ static int Main(string[] args)
3129
.MinimumLevel.Debug() // Minimum log level
3230
.CreateLogger();
3331

34-
Logger = Log.Logger.ForContext("Context", "Main");
35-
Logger.Information("Starting EasySign CLI at {DateTime}", DateTime.Now);
32+
var appLogger = Log.Logger.ForContext("Context", "Main");
33+
appLogger.Information("Starting EasySign CLI at {DateTime}", DateTime.Now);
3634

3735
var bundleLogger = new SerilogLoggerFactory(Log.Logger.ForContext("Context", "Bundle"))
3836
.CreateLogger("CommandProvider");
@@ -43,7 +41,7 @@ static int Main(string[] args)
4341
var root = new BundleCommandProvider(commandProviderLogger, bundleLogger).GetRootCommand();
4442
var exitCode = root.Invoke(args);
4543

46-
Logger.Information("Shutting down EasySign CLI at {DateTime} with exit code {ExitCode}", DateTime.Now, exitCode);
44+
appLogger.Information("Shutting down EasySign CLI at {DateTime} with exit code {ExitCode}", DateTime.Now, exitCode);
4745

4846
Log.CloseAndFlush();
4947
return exitCode;

src/EasySign.Cli/packages.lock.json

Lines changed: 27 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
},
2626
"Serilog.Extensions.Logging": {
2727
"type": "Direct",
28-
"requested": "[9.0.1, )",
29-
"resolved": "9.0.1",
30-
"contentHash": "IZo04/stVuOBhe0jzIe+6gVmiZ50i1cDljTnDyz6lqM7rbNhrHsPWg3IraJIvzZBihYPg5V9TVQYgRnm3xX8eA==",
28+
"requested": "[8.0.0, )",
29+
"resolved": "8.0.0",
30+
"contentHash": "YEAMWu1UnWgf1c1KP85l1SgXGfiVo0Rz6x08pCiPOIBt2Qe18tcZLvdBUuV5o1QHvrs8FAry9wTIhgBRtjIlEg==",
3131
"dependencies": {
32-
"Microsoft.Extensions.Logging": "9.0.0",
33-
"Serilog": "4.2.0"
32+
"Microsoft.Extensions.Logging": "8.0.0",
33+
"Serilog": "3.1.1"
3434
}
3535
},
3636
"Serilog.Sinks.File": {
@@ -49,55 +49,50 @@
4949
},
5050
"Microsoft.Extensions.DependencyInjection": {
5151
"type": "Transitive",
52-
"resolved": "9.0.0",
53-
"contentHash": "MCPrg7v3QgNMr0vX4vzRXvkNGgLg8vKWX0nKCWUxu2uPyMsaRgiRc1tHBnbTcfJMhMKj2slE/j2M9oGkd25DNw==",
52+
"resolved": "8.0.1",
53+
"contentHash": "BmANAnR5Xd4Oqw7yQ75xOAYODybZQRzdeNucg7kS5wWKd2PNnMdYtJ2Vciy0QLylRmv42DGl5+AFL9izA6F1Rw==",
5454
"dependencies": {
55-
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0"
55+
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2"
5656
}
5757
},
5858
"Microsoft.Extensions.DependencyInjection.Abstractions": {
5959
"type": "Transitive",
60-
"resolved": "9.0.0",
61-
"contentHash": "+6f2qv2a3dLwd5w6JanPIPs47CxRbnk+ZocMJUhv9NxP88VlOcJYZs9jY+MYSjxvady08bUZn6qgiNh7DadGgg=="
60+
"resolved": "8.0.2",
61+
"contentHash": "3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg=="
6262
},
6363
"Microsoft.Extensions.Logging": {
6464
"type": "Transitive",
65-
"resolved": "9.0.0",
66-
"contentHash": "crjWyORoug0kK7RSNJBTeSE6VX8IQgLf3nUpTB9m62bPXp/tzbnOsnbe8TXEG0AASNaKZddnpHKw7fET8E++Pg==",
65+
"resolved": "8.0.1",
66+
"contentHash": "4x+pzsQEbqxhNf1QYRr5TDkLP9UsLT3A6MdRKDDEgrW7h1ljiEPgTNhKYUhNCCAaVpQECVQ+onA91PTPnIp6Lw==",
6767
"dependencies": {
68-
"Microsoft.Extensions.DependencyInjection": "9.0.0",
69-
"Microsoft.Extensions.Logging.Abstractions": "9.0.0",
70-
"Microsoft.Extensions.Options": "9.0.0",
71-
"System.Diagnostics.DiagnosticSource": "9.0.0"
68+
"Microsoft.Extensions.DependencyInjection": "8.0.1",
69+
"Microsoft.Extensions.Logging.Abstractions": "8.0.2",
70+
"Microsoft.Extensions.Options": "8.0.2"
7271
}
7372
},
7473
"Microsoft.Extensions.Logging.Abstractions": {
7574
"type": "Transitive",
76-
"resolved": "9.0.0",
77-
"contentHash": "g0UfujELzlLbHoVG8kPKVBaW470Ewi+jnptGS9KUi6jcb+k2StujtK3m26DFSGGwQ/+bVgZfsWqNzlP6YOejvw==",
75+
"resolved": "8.0.2",
76+
"contentHash": "nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==",
7877
"dependencies": {
79-
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0",
80-
"System.Buffers": "4.5.1",
81-
"System.Diagnostics.DiagnosticSource": "9.0.0",
82-
"System.Memory": "4.5.5"
78+
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2",
79+
"System.Diagnostics.DiagnosticSource": "8.0.1"
8380
}
8481
},
8582
"Microsoft.Extensions.Options": {
8683
"type": "Transitive",
87-
"resolved": "9.0.0",
88-
"contentHash": "y2146b3jrPI3Q0lokKXdKLpmXqakYbDIPDV6r3M8SqvSf45WwOTzkyfDpxnZXJsJQEpAsAqjUq5Pu8RCJMjubg==",
84+
"resolved": "8.0.2",
85+
"contentHash": "dWGKvhFybsaZpGmzkGCbNNwBD1rVlWzrZKANLW/CcbFJpCEceMCGzT7zZwHOGBCbwM0SzBuceMj5HN1LKV1QqA==",
8986
"dependencies": {
90-
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0",
91-
"Microsoft.Extensions.Primitives": "9.0.0",
92-
"System.ComponentModel.Annotations": "5.0.0"
87+
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0",
88+
"Microsoft.Extensions.Primitives": "8.0.0"
9389
}
9490
},
9591
"Microsoft.Extensions.Primitives": {
9692
"type": "Transitive",
97-
"resolved": "9.0.0",
98-
"contentHash": "N3qEBzmLMYiASUlKxxFIISP4AiwuPTHF5uCh+2CWSwwzAJiIYx0kBJsS30cp1nvhSySFAVi30jecD307jV+8Kg==",
93+
"resolved": "8.0.0",
94+
"contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==",
9995
"dependencies": {
100-
"System.Memory": "4.5.5",
10196
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
10297
}
10398
},
@@ -106,35 +101,19 @@
106101
"resolved": "0.49.1",
107102
"contentHash": "USV+pdu49OJ3nCjxNuw1K9Zw/c1HCBbwbjXZp0EOn6wM99tFdAtN34KEBZUMyRuJuXlUMDqhd8Yq9obW2MslYA=="
108103
},
109-
"System.Buffers": {
110-
"type": "Transitive",
111-
"resolved": "4.5.1",
112-
"contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
113-
},
114104
"System.CommandLine": {
115105
"type": "Transitive",
116106
"resolved": "2.0.0-beta4.22272.1",
117107
"contentHash": "1uqED/q2H0kKoLJ4+hI2iPSBSEdTuhfCYADeJrAqERmiGQ2NNacYKRNEQ+gFbU4glgVyK8rxI+ZOe1onEtr/Pg=="
118108
},
119-
"System.ComponentModel.Annotations": {
120-
"type": "Transitive",
121-
"resolved": "5.0.0",
122-
"contentHash": "dMkqfy2el8A8/I76n2Hi1oBFEbG1SfxD2l5nhwXV3XjlnOmwxJlQbYpJH4W51odnU9sARCSAgv7S3CyAFMkpYg=="
123-
},
124109
"System.Diagnostics.DiagnosticSource": {
125110
"type": "Transitive",
126-
"resolved": "9.0.0",
127-
"contentHash": "ddppcFpnbohLWdYKr/ZeLZHmmI+DXFgZ3Snq+/E7SwcdW4UnvxmaugkwGywvGVWkHPGCSZjCP+MLzu23AL5SDw==",
111+
"resolved": "8.0.1",
112+
"contentHash": "vaoWjvkG1aenR2XdjaVivlCV9fADfgyhW5bZtXT23qaEea0lWiUljdQuze4E31vKM7ZWJaSUsbYIKE3rnzfZUg==",
128113
"dependencies": {
129-
"System.Memory": "4.5.5",
130114
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
131115
}
132116
},
133-
"System.Memory": {
134-
"type": "Transitive",
135-
"resolved": "4.5.5",
136-
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw=="
137-
},
138117
"System.Runtime.CompilerServices.Unsafe": {
139118
"type": "Transitive",
140119
"resolved": "6.0.0",

0 commit comments

Comments
 (0)