Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
// Ideally we'd call LoadIntoBufferAsync, but it has no overload that accepts a CancellationToken so we call ReadAsByteArrayAsync instead.
_ = await response.Content.ReadAsByteArrayAsync(cancellationToken).ConfigureAwait(false);

if (await GetAuthenticationAsync(_registryName, scheme, authInfo, cancellationToken).ConfigureAwait(false) is (AuthenticationHeaderValue authHeader, DateTimeOffset expirationTime))
if (await GetAuthenticationAsync(_registryName, scheme!, authInfo, cancellationToken).ConfigureAwait(false) is (AuthenticationHeaderValue authHeader, DateTimeOffset expirationTime))
{
_authenticationHeaders[_registryName] = authHeader;
request.Headers.Authorization = authHeader;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#if NETFRAMEWORK
using System;
using System.Linq;
#endif
#if NET
using System.Diagnostics.CodeAnalysis;
#endif
using System.Text;
using System.Text.Json.Nodes;
using System.Text.RegularExpressions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private HashSet<Port> GetExposedPorts()
&& property.Value is JsonObject propertyValue
&& ContainerHelpers.TryParsePort(propertyName, out Port? parsedPort, out ContainerHelpers.ParsePortError? _))
{
ports.Add(parsedPort.Value);
ports.Add(parsedPort!.Value);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
<ImplicitUsings Condition="'$(TargetFramework)' != 'net472'">enable</ImplicitUsings>
<TargetFrameworks>$(SdkTargetFramework)</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>

<TargetsForTfmSpecificBuildOutput>
$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage
</TargetsForTfmSpecificBuildOutput>

<!-- Tell the SDK to generate a deps.json file to be used by .NET SDK MSBuild -->
<GenerateDependencyFile Condition=" '$(TargetFramework)' != 'net472'">true</GenerateDependencyFile>
<GenerateDependencyFile>true</GenerateDependencyFile>

<!-- Allow the packaging project to use the name `Microsoft.NET.Build.Containers` for the nuget package -->
<Packageid>.</Packageid>
Expand All @@ -26,14 +26,13 @@

<ItemGroup>
<ProjectReference Include="..\..\Cli\Microsoft.DotNet.Cli.Utils\Microsoft.DotNet.Cli.Utils.csproj"
Condition="'$(TargetFramework)' != 'net472'"
GlobalPropertiesToRemove="PublishDir">
<!-- This is referenced by the core CLI as well so it doesn't need to be redistributed
in the containers task folder. -->
<IncludeAssets>build</IncludeAssets>
<Private>false</Private>
</ProjectReference>
<ProjectReference Include="..\..\Microsoft.Extensions.Logging.MSBuild\Microsoft.Extensions.Logging.MSBuild.csproj" Condition="'$(TargetFramework)' != 'net472'" />
<ProjectReference Include="..\..\Microsoft.Extensions.Logging.MSBuild\Microsoft.Extensions.Logging.MSBuild.csproj" />
</ItemGroup>

<ItemGroup>
Expand All @@ -44,51 +43,22 @@
</PackageReference>
<PackageReference Include="Nuget.Packaging">
<!-- In the SDK, NuGet is already available in the MSBuild/SDK directory -->
<ExcludeAssets Condition="'$(TargetFramework)' != 'net472'">runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="System.Text.Json" ExcludeAssets="runtime" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<!-- For the net472 flavor, lock back to a System.Text.Json equal to or older than MSBuild will provide
so it doesn't have to be redistributed. -->
<VersionOverride Condition="'$(TargetFramework)' == 'net472'">$(SystemTextJsonToolsetPackageVersion)</VersionOverride>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<Compile Include="$(RepoRoot)src\Common\VSHostObject.cs" LinkBase="Common" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net472'">
<ItemGroup>
<PackageReference Include="Valleysoft.DockerCredsProvider" />

<!-- References that are also carried in the SDK itself so don't need to be redistributed -->
<PackageReference Include="Microsoft.Extensions.Logging" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" ExcludeAssets="runtime" />
</ItemGroup>

<!-- .NET Framework builds manually import files to compile -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Compile Remove="**/*.*" />
<Compile Include="ReferenceParser.cs" />
<Compile Include="KnownStrings.cs" />
<Compile Include="DockerLoadException.cs" />
<Compile Include="Registry/RegistryConstants.cs" />
<Compile Include="Tasks/ParseContainerProperties.cs" />
<Compile Include="Tasks/CreateNewImage.Interface.cs" />
<Compile Include="Tasks/CreateNewImageToolTask.cs" />
<Compile Include="Tasks/ComputeDotnetBaseImageAndTag.cs" />
<Compile Include="ContainerHelpers.cs" />
<Compile Include="netframeworkDefinitions.cs" />
<Compile Include="Port.cs" />
<Compile Include="Resources\Resource.cs" />
<Compile Include="Resources\Strings.Designer.cs" />
<Compile Include="Globals.cs" />
</ItemGroup>

<!-- Non-.NET Framework builds remove files specific to .NET Framework workarounds -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
<Compile Remove="Tasks/CreateNewImageToolTask.cs" />
<Compile Remove="netframeworkDefinitions.cs" />
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\Strings.Designer.cs">
<DesignTime>True</DesignTime>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ Microsoft.NET.Build.Containers.Tasks.CreateNewImage.BaseRegistry.set -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.Cancel() -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ContainerEnvironmentVariables.get -> Microsoft.Build.Framework.ITaskItem![]!
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ContainerEnvironmentVariables.set -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ContainerizeDirectory.get -> string!
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ContainerizeDirectory.set -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ContainerRuntimeIdentifier.get -> string!
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ContainerRuntimeIdentifier.set -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ContainerUser.get -> string!
Expand Down Expand Up @@ -245,10 +243,6 @@ Microsoft.NET.Build.Containers.Tasks.CreateNewImage.PublishDirectory.get -> stri
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.PublishDirectory.set -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.RuntimeIdentifierGraphPath.get -> string!
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.RuntimeIdentifierGraphPath.set -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ToolExe.get -> string!
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ToolExe.set -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ToolPath.get -> string!
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ToolPath.set -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.WorkingDirectory.get -> string!
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.WorkingDirectory.set -> void
Microsoft.NET.Build.Containers.Tasks.CreateNewImage.GenerateLabels.get -> bool
Expand Down

This file was deleted.

Loading
Loading