Skip to content

Commit 7528c8f

Browse files
committed
Revert non-PR .NET 8 commits
1 parent 48299d7 commit 7528c8f

File tree

267 files changed

+1205
-1154
lines changed

Some content is hidden

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

267 files changed

+1205
-1154
lines changed

.azdo/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extends:
5454
displayName: Install .NET
5555
inputs:
5656
packageType: 'sdk'
57-
version: '8.0.x'
57+
version: '6.0.x'
5858

5959
# https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-security-configuration/configuration-guides/pat-burndown-guidance#workarounds-for-tasks-that-do-not-yet-support-wif-service-connection
6060
- task: AzureCLI@2

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
33
"name": "Component Detection",
4-
"image": "mcr.microsoft.com/vscode/devcontainers/dotnet:8.0",
4+
"image": "mcr.microsoft.com/vscode/devcontainers/dotnet:6.0",
55
"runArgs": ["--init"],
66
"extensions": [
77
"eamodio.gitlens",

.editorconfig

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -679,24 +679,6 @@ dotnet_diagnostic.CA1848.severity = suggestion
679679
# JSON002: Probable JSON string detected
680680
dotnet_diagnostic.JSON002.severity = suggestion
681681

682-
# IDE0290: Use primary constructor
683-
dotnet_diagnostic.IDE0290.severity = suggestion
684-
685-
# IDE0305: Simplify collection initialization
686-
dotnet_diagnostic.IDE0305.severity = suggestion
687-
688-
# SYSLIB1045: Convert to 'GeneratedRegexAttribute'.
689-
dotnet_diagnostic.SYSLIB1045.severity = suggestion
690-
691-
# CA1859: Use concrete types when possible for improved performance
692-
dotnet_diagnostic.CA1859.severity = suggestion
693-
694-
# CA1851: Possible multiple enumerations of 'IEnumerable' collection
695-
dotnet_diagnostic.CA1851.severity = suggestion
696-
697-
# CA1861: Avoid constant arrays as arguments
698-
dotnet_diagnostic.CA1861.severity = suggestion
699-
700682
# Workaround for https://github.com/dotnet/roslyn-analyzers/issues/5628
701683
[Program.cs]
702684
dotnet_diagnostic.ca1812.severity = none

Directory.Build.props

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

33
<PropertyGroup Label="Build">
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<LangVersion>latest</LangVersion>
66
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
77
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>

Directory.Packages.props

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
1010
<PackageVersion Include="Docker.DotNet" Version="3.125.15" />
1111
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
12-
<PackageVersion Include="FluentAssertions.Analyzers" Version="0.32.0" />
13-
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
14-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
15-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
16-
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.0" />
17-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
12+
<PackageVersion Include="FluentAssertions.Analyzers" Version="0.26.0" />
13+
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
14+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
15+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
16+
<PackageVersion Include="Microsoft.Extensions.Http" Version="7.0.0" />
17+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="7.0.0" />
1818
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
19-
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20" />
19+
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.8.14" />
2020
<PackageVersion Include="DotNet.Glob" Version="2.1.1" />
2121
<PackageVersion Include="MinVer" Version="5.0.0" />
2222
<PackageVersion Include="Moq" Version="4.18.4" />
@@ -33,25 +33,26 @@
3333
<PackageVersion Include="Polly" Version="8.4.0" />
3434
<PackageVersion Include="SemanticVersioning" Version="2.0.2" />
3535
<PackageVersion Include="Serilog" Version="4.0.0" />
36-
<PackageVersion Include="Serilog.Extensions.Logging" Version="8.0.0" />
36+
<PackageVersion Include="Serilog.Extensions.Logging" Version="7.0.0" />
3737
<PackageVersion Include="Serilog.Sinks.Async" Version="1.5.0" />
3838
<PackageVersion Include="Serilog.Sinks.Console" Version="5.0.1" />
3939
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.0" />
4040
<PackageVersion Include="Serilog.Sinks.Map" Version="1.0.2" />
41-
<PackageVersion Include="Spectre.Console" Version="0.49.1" />
42-
<PackageVersion Include="Spectre.Console.Cli" Version="0.49.1" />
41+
<PackageVersion Include="Spectre.Console" Version="0.48.0" />
42+
<PackageVersion Include="Spectre.Console.Cli" Version="0.48.0" />
4343
<PackageVersion Include="Spectre.Console.Cli.Extensions.DependencyInjection" Version="0.2.0" />
44-
<PackageVersion Include="Spectre.Console.Testing" Version="0.49.1" />
44+
<PackageVersion Include="Spectre.Console.Testing" Version="0.48.0" />
4545
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
4646
<PackageVersion Include="System.Memory" Version="4.5.5" />
4747
<PackageVersion Include="System.Reactive" Version="6.0.1" />
4848
<PackageVersion Include="System.Runtime.Loader" Version="4.3.0" />
49-
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
50-
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.0" />
49+
<PackageVersion Include="System.Text.Json" Version="6.0.9" />
50+
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
5151
<PackageVersion Include="Tomlyn.Signed" Version="0.17.0" />
5252
<PackageVersion Include="yamldotnet" Version="15.1.6" />
5353
<PackageVersion Include="Faker.net" Version="2.0.163" />
5454
<PackageVersion Include="Valleysoft.DockerfileModel" Version="1.1.1" />
55+
5556
<!-- Fix security alerts -->
5657
<PackageVersion Include="System.Formats.Asn1" Version="6.0.1" />
5758
</ItemGroup>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.401",
3+
"version": "6.0.422",
44
"rollForward": "latestMinor"
55
}
66
}

src/Microsoft.ComponentDetection.Common/AsyncExecution.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Microsoft.ComponentDetection.Common;
1+
namespace Microsoft.ComponentDetection.Common;
22

33
using System;
44
using System.Threading;
@@ -21,7 +21,10 @@ public static class AsyncExecution
2121
/// <exception cref="TimeoutException">Thrown when the execution does not complete within the timeout.</exception>
2222
public static async Task<T> ExecuteWithTimeoutAsync<T>(Func<Task<T>> toExecute, TimeSpan timeout, CancellationToken cancellationToken)
2323
{
24-
ArgumentNullException.ThrowIfNull(toExecute);
24+
if (toExecute == null)
25+
{
26+
throw new ArgumentNullException(nameof(toExecute));
27+
}
2528

2629
var work = Task.Run(toExecute);
2730

@@ -45,7 +48,10 @@ public static async Task<T> ExecuteWithTimeoutAsync<T>(Func<Task<T>> toExecute,
4548
/// <exception cref="TimeoutException">Thrown when the execution does not complete within the timeout.</exception>
4649
public static async Task ExecuteVoidWithTimeoutAsync(Action toExecute, TimeSpan timeout, CancellationToken cancellationToken)
4750
{
48-
ArgumentNullException.ThrowIfNull(toExecute);
51+
if (toExecute == null)
52+
{
53+
throw new ArgumentNullException(nameof(toExecute));
54+
}
4955

5056
var work = Task.Run(toExecute, cancellationToken);
5157
var completedInTime = await Task.Run(() => work.Wait(timeout));

src/Microsoft.ComponentDetection.Common/Column.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Microsoft.ComponentDetection.Common;
1+
namespace Microsoft.ComponentDetection.Common;
22

33
public class Column
44
{

src/Microsoft.ComponentDetection.Common/CommandLineInvocationService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public class CommandLineInvocationService : ICommandLineInvocationService
2020
/// <inheritdoc/>
2121
public async Task<bool> CanCommandBeLocatedAsync(string command, IEnumerable<string> additionalCandidateCommands = null, DirectoryInfo workingDirectory = null, params string[] parameters)
2222
{
23-
additionalCandidateCommands ??= [];
24-
parameters ??= [];
23+
additionalCandidateCommands ??= Enumerable.Empty<string>();
24+
parameters ??= Array.Empty<string>();
2525
var allCommands = new[] { command }.Concat(additionalCandidateCommands);
2626
if (!this.commandLocatableCache.TryGetValue(command, out var validCommand))
2727
{

src/Microsoft.ComponentDetection.Common/ComponentComparer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Microsoft.ComponentDetection.Common;
1+
namespace Microsoft.ComponentDetection.Common;
22

33
using System.Collections.Generic;
44
using Microsoft.ComponentDetection.Contracts.TypedComponent;

0 commit comments

Comments
 (0)