Skip to content

Commit a402cc9

Browse files
committed
Revert "make repo build on .NET 8 SDK"
This reverts commit f4f46c6.
1 parent e78e2fa commit a402cc9

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

Microsoft.NET.Build.Containers.IntegrationTests/CommandUtils/TestCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private SdkCommandSpec CreateCommandSpec(IEnumerable<string> args)
117117
commandSpec.WorkingDirectory = WorkingDirectory;
118118
}
119119

120-
if (Arguments.Count > 0)
120+
if (Arguments.Any())
121121
{
122122
commandSpec.Arguments = Arguments.Concat(commandSpec.Arguments).ToList();
123123
}

Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private static bool TryParseAuthenticationInfo(HttpResponseMessage msg, [NotNull
3737
scheme = null;
3838

3939
var authenticateHeader = msg.Headers.WwwAuthenticate;
40-
if (!(authenticateHeader.Count > 0))
40+
if (!authenticateHeader.Any())
4141
{
4242
return false;
4343
}
@@ -111,7 +111,7 @@ private sealed record TokenResponse(string? token, string? access_token, int? ex
111111
throw new CredentialRetrievalException(registry, e);
112112
}
113113
}
114-
114+
115115
if (scheme is "Basic")
116116
{
117117
var basicAuth = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(Encoding.ASCII.GetBytes($"{privateRepoCreds.Username}:{privateRepoCreds.Password}")));

Microsoft.NET.Build.Containers/ImageConfig.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ internal string BuildConfig()
6666
{
6767
var newConfig = new JsonObject();
6868

69-
if (_exposedPorts.Count > 0)
69+
if (_exposedPorts.Any())
7070
{
7171
newConfig["ExposedPorts"] = CreatePortMap();
7272
}
73-
if (_labels.Count > 0)
73+
if (_labels.Any())
7474
{
7575
newConfig["Labels"] = CreateLabelMap();
7676
}
77-
if (_environmentVariables.Count > 0)
77+
if (_environmentVariables.Any())
7878
{
7979
newConfig["Env"] = CreateEnvironmentVariablesMapping();
8080
}

Microsoft.NET.Build.Containers/Tasks/ParseContainerProperties.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public override bool Execute()
106106
else if (ContainerImageTags.Length != 0 && TryValidateTags(ContainerImageTags, out var valids, out var invalids))
107107
{
108108
validTags = valids;
109-
if (invalids.Length > 0)
109+
if (invalids.Any())
110110
{
111111
Log.LogErrorWithCodeFromResources(nameof(Strings.InvalidTags), nameof(ContainerImageTags), String.Join(",", invalids));
112112
return !Log.HasLoggedErrors;

containerize/ContainerizeCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ internal class ContainerizeCommand : RootCommand
168168

169169

170170
internal ContainerizeCommand() : base("Containerize an application without Docker.")
171-
{
171+
{
172172
this.AddArgument(PublishDirectoryArgument);
173173
this.AddOption(BaseRegistryOption);
174174
this.AddOption(BaseImageNameOption);

0 commit comments

Comments
 (0)