From bd0968bd1ed3ed3e1d7f200c6ed350520107e9d5 Mon Sep 17 00:00:00 2001 From: Phillip Hoff Date: Fri, 4 Jun 2021 15:42:55 -0700 Subject: [PATCH] Update projects/tests to target .NET 6. --- eng/common/tools.ps1 | 2 +- eng/common/tools.sh | 2 +- src/Microsoft.Tye.Core/ApplicationFactory.cs | 3 ++- .../ConfigModel/ConfigApplication.cs | 3 ++- src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj | 2 +- .../Microsoft.Tye.Extensions.csproj | 2 +- .../Microsoft.Tye.Hosting.Diagnostics.csproj | 2 +- src/Microsoft.Tye.Hosting/HttpProxyService.cs | 3 ++- .../Infrastructure/ProxyExtensions.cs | 6 ++++-- .../Infrastructure/ServiceLoggerProvider.cs | 7 +++++-- .../Microsoft.Tye.Hosting.csproj | 2 +- src/Microsoft.Tye.Hosting/ProxyService.cs | 12 ++++++++---- .../TransformProjectsIntoContainers.cs | 4 ++-- src/Microsoft.Tye.Hosting/TyeHost.cs | 3 ++- src/Microsoft.Tye.Proxy/Microsoft.Tye.Proxy.csproj | 2 +- src/Microsoft.Tye.Proxy/Program.cs | 14 +++++++++----- src/shared/KubectlDetector.cs | 5 +++-- src/tye-diag-agent/tye-diag-agent.csproj | 2 +- src/tye/InitHost.cs | 3 ++- src/tye/tye.csproj | 2 +- test/E2ETest/ApplicationFactoryTests.cs | 6 +++--- test/E2ETest/Microsoft.Tye.E2ETests.csproj | 2 +- test/E2ETest/TyeBuildTests.Dockerfile.cs | 4 ++-- test/E2ETest/TyeRunTests.cs | 2 +- .../Console.Normalization.svc.Name.csproj | 2 +- .../ApplicationA/ApplicationA.csproj | 2 +- .../ApplicationB/ApplicationB.csproj | 2 +- .../ApplicationC-UI/ApplicationC-UI.csproj | 2 +- .../azure-functions/backend/backend.csproj | 2 +- .../azure-functions/frontend/frontend.csproj | 2 +- test/E2ETest/testassets/projects/dapr/dapr.csproj | 2 +- .../projects/dockerfile/frontend/frontend.csproj | 2 +- .../backend/backend-baseimage.csproj | 2 +- .../frontend-backend/backend/backend.csproj | 2 +- .../frontend-backend/frontend/frontend.csproj | 2 +- .../frontend/frontend.csproj | 2 +- .../frontend/frontend.csproj | 2 +- .../frontend/frontend.csproj | 2 +- .../projects/health-checks/api/api.csproj | 2 +- .../multi-phase-dockerfile.csproj | 2 +- .../projects/multi-project/backend/backend.csproj | 2 +- .../multi-project/frontend/frontend.csproj | 2 +- .../projects/multi-project/worker/worker.csproj | 2 +- .../multi-targetframeworks.csproj | 2 +- .../tye-with-netcoreapp31.yaml | 2 +- .../projects/multirepo/results/results.csproj | 2 +- .../testassets/projects/multirepo/vote/vote.csproj | 2 +- .../projects/multirepo/worker/worker.csproj | 2 +- .../nginx-ingress/ApplicationA/ApplicationA.csproj | 2 +- .../nginx-ingress/ApplicationB/ApplicationB.csproj | 2 +- .../projects/project-types/app/app.csproj | 2 +- .../class-library/class-library.csproj | 2 +- .../project-types/test-project/test-project.csproj | 2 +- .../single-phase-dockerfile-args.csproj | 2 +- .../single-phase-dockerfile-args.csproj | 2 +- .../single-phase-dockerfile-multi-args.csproj | 2 +- .../single-phase-dockerfile.csproj | 2 +- .../test-project/test-project.csproj | 2 +- .../projects/volume-test/volume-test.csproj | 2 +- .../testassets/projects/web-app/web-app.csproj | 2 +- ...osoft.Tye.Extensions.Configuration.Tests.csproj | 2 +- .../Test.Infrastructure/Test.Infrastructure.csproj | 2 +- test/UnitTests/Microsoft.Tye.UnitTests.csproj | 2 +- 63 files changed, 96 insertions(+), 77 deletions(-) diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 2d8a74f7..89c55b18 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -521,7 +521,7 @@ function InitializeBuildTool() { ExitWithExitCode 1 } $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet') - $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp3.1' } + $buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net6.0' } } elseif ($msbuildEngine -eq "vs") { try { $msbuildPath = InitializeVisualStudioMSBuild -install:$restore diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 5fad1846..0af84953 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -306,7 +306,7 @@ function InitializeBuildTool { # return values _InitializeBuildTool="$_InitializeDotNetCli/dotnet" _InitializeBuildToolCommand="msbuild" - _InitializeBuildToolFramework="netcoreapp3.1" + _InitializeBuildToolFramework="net6.0" } # Set RestoreNoCache as a workaround for https://github.com/NuGet/Home/issues/3116 diff --git a/src/Microsoft.Tye.Core/ApplicationFactory.cs b/src/Microsoft.Tye.Core/ApplicationFactory.cs index b65b3aaa..a8120be5 100644 --- a/src/Microsoft.Tye.Core/ApplicationFactory.cs +++ b/src/Microsoft.Tye.Core/ApplicationFactory.cs @@ -164,7 +164,8 @@ namespace Microsoft.Tye if (!string.IsNullOrEmpty(configService.Project)) { - var project = new DotnetProjectServiceBuilder(configService.Name!, new FileInfo(configService.ProjectFullPath)); + // TODO: Investigate possible null. + var project = new DotnetProjectServiceBuilder(configService.Name!, new FileInfo(configService.ProjectFullPath!)); service = project; project.Build = configService.Build ?? true; diff --git a/src/Microsoft.Tye.Core/ConfigModel/ConfigApplication.cs b/src/Microsoft.Tye.Core/ConfigModel/ConfigApplication.cs index 7093eaa2..1d7c47ea 100644 --- a/src/Microsoft.Tye.Core/ConfigModel/ConfigApplication.cs +++ b/src/Microsoft.Tye.Core/ConfigModel/ConfigApplication.cs @@ -142,7 +142,8 @@ namespace Microsoft.Tye.ConfigModel foreach (var probe in probes) { context = new ValidationContext(probe.Probe!); - if (!Validator.TryValidateObject(probe.Probe, context, results, validateAllProperties: true)) + // TODO: Investigate possible null. + if (!Validator.TryValidateObject(probe.Probe!, context, results, validateAllProperties: true)) { throw new TyeYamlException( $"Probe '{probe.Name}' in service '{service.Name}' validation failed." + Environment.NewLine + diff --git a/src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj b/src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj index b35ca1b9..8568bcfc 100644 --- a/src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj +++ b/src/Microsoft.Tye.Core/Microsoft.Tye.Core.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net6.0 Tye Microsoft.Tye.Core Microsoft.Tye.Core diff --git a/src/Microsoft.Tye.Extensions/Microsoft.Tye.Extensions.csproj b/src/Microsoft.Tye.Extensions/Microsoft.Tye.Extensions.csproj index 0ca4ab55..65d4a59c 100644 --- a/src/Microsoft.Tye.Extensions/Microsoft.Tye.Extensions.csproj +++ b/src/Microsoft.Tye.Extensions/Microsoft.Tye.Extensions.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/src/Microsoft.Tye.Hosting.Diagnostics/Microsoft.Tye.Hosting.Diagnostics.csproj b/src/Microsoft.Tye.Hosting.Diagnostics/Microsoft.Tye.Hosting.Diagnostics.csproj index 3b0db741..d46381fc 100644 --- a/src/Microsoft.Tye.Hosting.Diagnostics/Microsoft.Tye.Hosting.Diagnostics.csproj +++ b/src/Microsoft.Tye.Hosting.Diagnostics/Microsoft.Tye.Hosting.Diagnostics.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net6.0 Diagnostics collector and exporter for .NET Core applications. Microsoft.Tye.Hosting.Diagnostics Microsoft.Tye.Hosting.Diagnostics diff --git a/src/Microsoft.Tye.Hosting/HttpProxyService.cs b/src/Microsoft.Tye.Hosting/HttpProxyService.cs index cf3b1a08..f659e418 100644 --- a/src/Microsoft.Tye.Hosting/HttpProxyService.cs +++ b/src/Microsoft.Tye.Hosting/HttpProxyService.cs @@ -177,7 +177,8 @@ namespace Microsoft.Tye.Hosting } var uri = new UriBuilder(uris[next].Uri) { - Path = rule.PreservePath ? $"{context.Request.Path}" : (string)context.Request.RouteValues["path"] ?? "/", + // TODO: Investigate possible null. + Path = rule.PreservePath ? $"{context.Request.Path}" : (string)context.Request!.RouteValues["path"]! ?? "/", Query = context.Request.QueryString.Value }; diff --git a/src/Microsoft.Tye.Hosting/Infrastructure/ProxyExtensions.cs b/src/Microsoft.Tye.Hosting/Infrastructure/ProxyExtensions.cs index 36e40824..ce6fac26 100644 --- a/src/Microsoft.Tye.Hosting/Infrastructure/ProxyExtensions.cs +++ b/src/Microsoft.Tye.Hosting/Infrastructure/ProxyExtensions.cs @@ -88,7 +88,8 @@ namespace Microsoft.AspNetCore.Proxy // Append request forwarding headers requestMessage.Headers.TryAddWithoutValidation("Via", $"{context.Request.Protocol} Tye"); - requestMessage.Headers.TryAddWithoutValidation("X-Forwarded-For", context.Connection.RemoteIpAddress.ToString()); + // TODO: Investigate possible null. + requestMessage.Headers.TryAddWithoutValidation("X-Forwarded-For", context.Connection!.RemoteIpAddress!.ToString()); requestMessage.Headers.TryAddWithoutValidation("X-Forwarded-Proto", request.Scheme); requestMessage.Headers.TryAddWithoutValidation("X-Forwarded-Host", request.Host.ToUriComponent()); @@ -129,7 +130,8 @@ namespace Microsoft.AspNetCore.Proxy } AppendHeaderValue(client.Options, context.Request.Headers, "Via", context.Request.Protocol); - AppendHeaderValue(client.Options, context.Request.Headers, "X-Forwarded-For", context.Connection.RemoteIpAddress.ToString()); + // TODO: Investigate possible null. + AppendHeaderValue(client.Options, context.Request.Headers, "X-Forwarded-For", context.Connection!.RemoteIpAddress!.ToString()); AppendHeaderValue(client.Options, context.Request.Headers, "X-Forwarded-Proto", context.Request.Scheme); AppendHeaderValue(client.Options, context.Request.Headers, "X-Forwarded-Host", context.Request.Host.ToUriComponent()); diff --git a/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs b/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs index eac51434..04a1fc2d 100644 --- a/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs +++ b/src/Microsoft.Tye.Hosting/Infrastructure/ServiceLoggerProvider.cs @@ -47,9 +47,12 @@ namespace Microsoft.Tye.Hosting return true; } - public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) + public void Log(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func? formatter) { - _logs.OnNext($"[{logLevel}]: {formatter(state, exception)}"); + if (formatter != null && exception != null) + { + _logs.OnNext($"[{logLevel}]: {formatter(state, exception)}"); + } if (exception != null) { diff --git a/src/Microsoft.Tye.Hosting/Microsoft.Tye.Hosting.csproj b/src/Microsoft.Tye.Hosting/Microsoft.Tye.Hosting.csproj index c4c1af87..e2c1ac63 100644 --- a/src/Microsoft.Tye.Hosting/Microsoft.Tye.Hosting.csproj +++ b/src/Microsoft.Tye.Hosting/Microsoft.Tye.Hosting.csproj @@ -2,7 +2,7 @@ Library - netcoreapp3.1 + net6.0 Orchestration host APIs. Microsoft.Tye.Hosting Microsoft.Tye.Hosting diff --git a/src/Microsoft.Tye.Hosting/ProxyService.cs b/src/Microsoft.Tye.Hosting/ProxyService.cs index b11d60fa..24d6f61a 100644 --- a/src/Microsoft.Tye.Hosting/ProxyService.cs +++ b/src/Microsoft.Tye.Hosting/ProxyService.cs @@ -89,7 +89,8 @@ namespace Microsoft.Tye.Hosting return; } - using var _ = cts.Token.Register(() => notificationFeature.RequestClose()); + // TODO: Investigate possible null. + using var _ = cts.Token.Register(() => notificationFeature!.RequestClose()); NetworkStream? targetStream = null; @@ -126,11 +127,13 @@ namespace Microsoft.Tye.Hosting { _logger.LogDebug("Proxying traffic to {ServiceName} {ExternalPort}:{InternalPort}", service.Description.Name, binding.Port, ports[next]); + // TODO: Investigate possible null. // external -> internal - var reading = Task.Run(() => connection.Transport.Input.CopyToAsync(targetStream, notificationFeature.ConnectionClosedRequested)); + var reading = Task.Run(() => connection.Transport.Input.CopyToAsync(targetStream, notificationFeature!.ConnectionClosedRequested)); + // TODO: Investigate possible null. // internal -> external - var writing = Task.Run(() => targetStream.CopyToAsync(connection.Transport.Output, notificationFeature.ConnectionClosedRequested)); + var writing = Task.Run(() => targetStream.CopyToAsync(connection.Transport.Output, notificationFeature!.ConnectionClosedRequested)); await Task.WhenAll(reading, writing); } @@ -144,7 +147,8 @@ namespace Microsoft.Tye.Hosting } catch (OperationCanceledException ex) { - if (!notificationFeature.ConnectionClosedRequested.IsCancellationRequested) + // TODO: Investigate possible null. + if (!notificationFeature!.ConnectionClosedRequested.IsCancellationRequested) { _logger.LogDebug(0, ex, "Proxy error for service {ServiceName}", service.Description.Name); } diff --git a/src/Microsoft.Tye.Hosting/TransformProjectsIntoContainers.cs b/src/Microsoft.Tye.Hosting/TransformProjectsIntoContainers.cs index 99225ba3..36a01a47 100644 --- a/src/Microsoft.Tye.Hosting/TransformProjectsIntoContainers.cs +++ b/src/Microsoft.Tye.Hosting/TransformProjectsIntoContainers.cs @@ -87,10 +87,10 @@ namespace Microsoft.Tye.Hosting // This is .NET specific var userSecretStore = GetUserSecretsPathFromSecrets(); - Directory.CreateDirectory(userSecretStore); - if (!string.IsNullOrEmpty(userSecretStore)) { + Directory.CreateDirectory(userSecretStore); + // Map the user secrets on this drive to user secrets dockerRunInfo.VolumeMappings.Add(new DockerVolume(source: userSecretStore, name: null, target: "/root/.microsoft/usersecrets", readOnly: true)); } diff --git a/src/Microsoft.Tye.Hosting/TyeHost.cs b/src/Microsoft.Tye.Hosting/TyeHost.cs index 4690d24f..2392601f 100644 --- a/src/Microsoft.Tye.Hosting/TyeHost.cs +++ b/src/Microsoft.Tye.Hosting/TyeHost.cs @@ -102,7 +102,8 @@ namespace Microsoft.Tye.Hosting await app.StartAsync(); - _addresses = DashboardWebApplication.Services.GetRequiredService().Features.Get().Addresses; + // TODO: Investigate possible null. + _addresses = DashboardWebApplication.Services.GetRequiredService().Features.Get()!.Addresses; _logger.LogInformation("Dashboard running on {Address}", _addresses.First()); diff --git a/src/Microsoft.Tye.Proxy/Microsoft.Tye.Proxy.csproj b/src/Microsoft.Tye.Proxy/Microsoft.Tye.Proxy.csproj index 6a001f93..47d8f1ac 100644 --- a/src/Microsoft.Tye.Proxy/Microsoft.Tye.Proxy.csproj +++ b/src/Microsoft.Tye.Proxy/Microsoft.Tye.Proxy.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0 diff --git a/src/Microsoft.Tye.Proxy/Program.cs b/src/Microsoft.Tye.Proxy/Program.cs index fb5e2ce1..53ac5631 100644 --- a/src/Microsoft.Tye.Proxy/Program.cs +++ b/src/Microsoft.Tye.Proxy/Program.cs @@ -64,7 +64,8 @@ namespace Microsoft.Tye.Proxy logger.LogDebug("Attempting to connect to {ServiceName} listening on {Port}:{ExternalPort}", serviceName, mapping.Port, mapping.ExternalPort); - await target.ConnectAsync(containerHost, mapping.ExternalPort); + // TODO: Investigate null host. + await target.ConnectAsync(containerHost!, mapping.ExternalPort); logger.LogDebug("Successfully connected to {ServiceName} listening on {Port}:{ExternalPort}", serviceName, mapping.Port, mapping.ExternalPort); @@ -87,11 +88,13 @@ namespace Microsoft.Tye.Proxy { logger.LogDebug("Proxying traffic to {ServiceName} {Port}:{ExternalPort}", serviceName, mapping.Port, mapping.ExternalPort); - // external -> internal - var reading = Task.Run(() => connection.Transport.Input.CopyToAsync(targetStream, notificationFeature.ConnectionClosedRequested)); + // TODO: Investigate possible null. + // external -> internal + var reading = Task.Run(() => connection.Transport.Input.CopyToAsync(targetStream, notificationFeature!.ConnectionClosedRequested)); + // TODO: Investigate possible null. // internal -> external - var writing = Task.Run(() => targetStream.CopyToAsync(connection.Transport.Output, notificationFeature.ConnectionClosedRequested)); + var writing = Task.Run(() => targetStream.CopyToAsync(connection.Transport.Output, notificationFeature!.ConnectionClosedRequested)); await Task.WhenAll(reading, writing); } @@ -105,7 +108,8 @@ namespace Microsoft.Tye.Proxy } catch (OperationCanceledException ex) { - if (!notificationFeature.ConnectionClosedRequested.IsCancellationRequested) + // TODO: Investigate possible null. + if (!notificationFeature!.ConnectionClosedRequested.IsCancellationRequested) { logger.LogDebug(0, ex, "Proxy error for service {ServiceName}", serviceName); } diff --git a/src/shared/KubectlDetector.cs b/src/shared/KubectlDetector.cs index 1cd0ca78..2bef51fd 100644 --- a/src/shared/KubectlDetector.cs +++ b/src/shared/KubectlDetector.cs @@ -47,8 +47,9 @@ namespace Microsoft.Tye { continue; } - var major = int.Parse(element.Value.GetProperty("major").GetString()); - var minor = int.Parse(element.Value.GetProperty("minor").GetString().Trim('+')); + // TODO: Investigate possible null. + var major = int.Parse(element.Value!.GetProperty("major")!.GetString()!); + var minor = int.Parse(element.Value!.GetProperty("minor")!.GetString()!.Trim('+')); var version = new Version(major, minor); return version; } diff --git a/src/tye-diag-agent/tye-diag-agent.csproj b/src/tye-diag-agent/tye-diag-agent.csproj index 6278740f..b630c6c4 100644 --- a/src/tye-diag-agent/tye-diag-agent.csproj +++ b/src/tye-diag-agent/tye-diag-agent.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Microsoft.Tye diff --git a/src/tye/InitHost.cs b/src/tye/InitHost.cs index e0daeb37..56119fba 100644 --- a/src/tye/InitHost.cs +++ b/src/tye/InitHost.cs @@ -37,7 +37,8 @@ namespace Microsoft.Tye throw new CommandException(errorMessage!); } - path = new FileInfo(filePath); + // TODO: Investigate possible null. + path = new FileInfo(filePath!); } var template = @" diff --git a/src/tye/tye.csproj b/src/tye/tye.csproj index cbafea83..fbc3ad9c 100644 --- a/src/tye/tye.csproj +++ b/src/tye/tye.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0 Microsoft.Tye tye Microsoft.Tye diff --git a/test/E2ETest/ApplicationFactoryTests.cs b/test/E2ETest/ApplicationFactoryTests.cs index 3646d258..40f900eb 100644 --- a/test/E2ETest/ApplicationFactoryTests.cs +++ b/test/E2ETest/ApplicationFactoryTests.cs @@ -135,14 +135,14 @@ services: // Debug targets can be null if not specified, so make sure calling host.Start does not throw. var outputContext = new OutputContext(_sink, Verbosity.Debug); var projectFile = new FileInfo(yamlFile); - var applicationBuilder = await ApplicationFactory.CreateAsync(outputContext, projectFile, "netcoreapp3.1"); + var applicationBuilder = await ApplicationFactory.CreateAsync(outputContext, projectFile, "net6.0"); Assert.Single(applicationBuilder.Services); var service = applicationBuilder.Services.Single(s => s.Name == "multi-targetframeworks"); var containsTargetFramework = ((DotnetProjectServiceBuilder)service).BuildProperties.TryGetValue("TargetFramework", out var targetFramework); Assert.True(containsTargetFramework); - Assert.Equal("netcoreapp3.1", targetFramework); + Assert.Equal("net6.0", targetFramework); } [Fact] @@ -154,7 +154,7 @@ services: // Debug targets can be null if not specified, so make sure calling host.Start does not throw. var outputContext = new OutputContext(_sink, Verbosity.Debug); var projectFile = new FileInfo(yamlFile); - var applicationBuilder = await ApplicationFactory.CreateAsync(outputContext, projectFile, "netcoreapp3.1"); + var applicationBuilder = await ApplicationFactory.CreateAsync(outputContext, projectFile, "net6.0"); Assert.Single(applicationBuilder.Services); var service = applicationBuilder.Services.Single(s => s.Name == "multi-targetframeworks"); diff --git a/test/E2ETest/Microsoft.Tye.E2ETests.csproj b/test/E2ETest/Microsoft.Tye.E2ETests.csproj index 71705c10..668ec7a7 100644 --- a/test/E2ETest/Microsoft.Tye.E2ETests.csproj +++ b/test/E2ETest/Microsoft.Tye.E2ETests.csproj @@ -2,7 +2,7 @@ - netcoreapp3.1 + net6.0 Microsoft.Tye.E2ETest true true diff --git a/test/E2ETest/TyeBuildTests.Dockerfile.cs b/test/E2ETest/TyeBuildTests.Dockerfile.cs index d81c94c4..10cffd90 100644 --- a/test/E2ETest/TyeBuildTests.Dockerfile.cs +++ b/test/E2ETest/TyeBuildTests.Dockerfile.cs @@ -226,7 +226,7 @@ namespace E2ETest var projectFile = new FileInfo(Path.Combine(projectDirectory.DirectoryPath, "tye-no-buildproperties.yaml")); var outputContext = new OutputContext(sink, Verbosity.Debug); - var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "netcoreapp3.1"); + var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "net6.0"); application.Registry = new ContainerRegistry("test"); @@ -260,7 +260,7 @@ namespace E2ETest var projectFile = new FileInfo(Path.Combine(projectDirectory.DirectoryPath, "tye-with-netcoreapp31.yaml")); var outputContext = new OutputContext(sink, Verbosity.Debug); - var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "netcoreapp3.1"); + var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "net6.0"); application.Registry = new ContainerRegistry("test"); diff --git a/test/E2ETest/TyeRunTests.cs b/test/E2ETest/TyeRunTests.cs index 95193fbf..ac9ae81d 100644 --- a/test/E2ETest/TyeRunTests.cs +++ b/test/E2ETest/TyeRunTests.cs @@ -1040,7 +1040,7 @@ services: var projectFile = new FileInfo(Path.Combine(projectDirectory.DirectoryPath, "tye-no-buildproperties.yaml")); var outputContext = new OutputContext(_sink, Verbosity.Debug); - var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "netcoreapp3.1"); + var application = await ApplicationFactory.CreateAsync(outputContext, projectFile, "net6.0"); var handler = new HttpClientHandler { diff --git a/test/E2ETest/testassets/projects/Console.Normalization.svc.Name/Console.Normalization.svc.Name.csproj b/test/E2ETest/testassets/projects/Console.Normalization.svc.Name/Console.Normalization.svc.Name.csproj index c73e0d16..41f1d5ad 100644 --- a/test/E2ETest/testassets/projects/Console.Normalization.svc.Name/Console.Normalization.svc.Name.csproj +++ b/test/E2ETest/testassets/projects/Console.Normalization.svc.Name/Console.Normalization.svc.Name.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationA/ApplicationA.csproj b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationA/ApplicationA.csproj index 92605c5a..e948168d 100644 --- a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationA/ApplicationA.csproj +++ b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationA/ApplicationA.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationB/ApplicationB.csproj b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationB/ApplicationB.csproj index 92605c5a..e948168d 100644 --- a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationB/ApplicationB.csproj +++ b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationB/ApplicationB.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationC-UI/ApplicationC-UI.csproj b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationC-UI/ApplicationC-UI.csproj index 92605c5a..e948168d 100644 --- a/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationC-UI/ApplicationC-UI.csproj +++ b/test/E2ETest/testassets/projects/apps-with-ingress/ApplicationC-UI/ApplicationC-UI.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj b/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj index 4f703f2d..8516359a 100644 --- a/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj +++ b/test/E2ETest/testassets/projects/azure-functions/backend/backend.csproj @@ -1,6 +1,6 @@ - netcoreapp3.1 + net6.0 v3 diff --git a/test/E2ETest/testassets/projects/azure-functions/frontend/frontend.csproj b/test/E2ETest/testassets/projects/azure-functions/frontend/frontend.csproj index 0aa4abc0..614c8174 100644 --- a/test/E2ETest/testassets/projects/azure-functions/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/azure-functions/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Frontend diff --git a/test/E2ETest/testassets/projects/dapr/dapr.csproj b/test/E2ETest/testassets/projects/dapr/dapr.csproj index 92605c5a..e948168d 100644 --- a/test/E2ETest/testassets/projects/dapr/dapr.csproj +++ b/test/E2ETest/testassets/projects/dapr/dapr.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/dockerfile/frontend/frontend.csproj b/test/E2ETest/testassets/projects/dockerfile/frontend/frontend.csproj index 0aa4abc0..614c8174 100644 --- a/test/E2ETest/testassets/projects/dockerfile/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/dockerfile/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Frontend diff --git a/test/E2ETest/testassets/projects/frontend-backend/backend/backend-baseimage.csproj b/test/E2ETest/testassets/projects/frontend-backend/backend/backend-baseimage.csproj index c99f0dea..97be2d50 100644 --- a/test/E2ETest/testassets/projects/frontend-backend/backend/backend-baseimage.csproj +++ b/test/E2ETest/testassets/projects/frontend-backend/backend/backend-baseimage.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Backend diff --git a/test/E2ETest/testassets/projects/frontend-backend/backend/backend.csproj b/test/E2ETest/testassets/projects/frontend-backend/backend/backend.csproj index 4e98f5a2..887a450c 100644 --- a/test/E2ETest/testassets/projects/frontend-backend/backend/backend.csproj +++ b/test/E2ETest/testassets/projects/frontend-backend/backend/backend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Backend diff --git a/test/E2ETest/testassets/projects/frontend-backend/frontend/frontend.csproj b/test/E2ETest/testassets/projects/frontend-backend/frontend/frontend.csproj index 0aa4abc0..614c8174 100644 --- a/test/E2ETest/testassets/projects/frontend-backend/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/frontend-backend/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Frontend diff --git a/test/E2ETest/testassets/projects/generate-connectionstring-dependency/frontend/frontend.csproj b/test/E2ETest/testassets/projects/generate-connectionstring-dependency/frontend/frontend.csproj index 92605c5a..e948168d 100644 --- a/test/E2ETest/testassets/projects/generate-connectionstring-dependency/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/generate-connectionstring-dependency/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/generate-named-binding/frontend/frontend.csproj b/test/E2ETest/testassets/projects/generate-named-binding/frontend/frontend.csproj index 92605c5a..e948168d 100644 --- a/test/E2ETest/testassets/projects/generate-named-binding/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/generate-named-binding/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/generate-uri-dependency/frontend/frontend.csproj b/test/E2ETest/testassets/projects/generate-uri-dependency/frontend/frontend.csproj index 92605c5a..e948168d 100644 --- a/test/E2ETest/testassets/projects/generate-uri-dependency/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/generate-uri-dependency/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/health-checks/api/api.csproj b/test/E2ETest/testassets/projects/health-checks/api/api.csproj index d12c450b..7ebfd2b4 100644 --- a/test/E2ETest/testassets/projects/health-checks/api/api.csproj +++ b/test/E2ETest/testassets/projects/health-checks/api/api.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/multi-phase-dockerfile/multi-phase-dockerfile.csproj b/test/E2ETest/testassets/projects/multi-phase-dockerfile/multi-phase-dockerfile.csproj index a08de39c..de81afb3 100644 --- a/test/E2ETest/testassets/projects/multi-phase-dockerfile/multi-phase-dockerfile.csproj +++ b/test/E2ETest/testassets/projects/multi-phase-dockerfile/multi-phase-dockerfile.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 multi_phase_dockerfile diff --git a/test/E2ETest/testassets/projects/multi-project/backend/backend.csproj b/test/E2ETest/testassets/projects/multi-project/backend/backend.csproj index 95596492..079d8fa1 100644 --- a/test/E2ETest/testassets/projects/multi-project/backend/backend.csproj +++ b/test/E2ETest/testassets/projects/multi-project/backend/backend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Backend diff --git a/test/E2ETest/testassets/projects/multi-project/frontend/frontend.csproj b/test/E2ETest/testassets/projects/multi-project/frontend/frontend.csproj index 82e8a2c6..6c3aac95 100644 --- a/test/E2ETest/testassets/projects/multi-project/frontend/frontend.csproj +++ b/test/E2ETest/testassets/projects/multi-project/frontend/frontend.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/multi-project/worker/worker.csproj b/test/E2ETest/testassets/projects/multi-project/worker/worker.csproj index bc8e4615..85476ad6 100644 --- a/test/E2ETest/testassets/projects/multi-project/worker/worker.csproj +++ b/test/E2ETest/testassets/projects/multi-project/worker/worker.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 dotnet-worker-E4419EA1-F496-4FE1-A024-7E75E40B9E10 Worker diff --git a/test/E2ETest/testassets/projects/multi-targetframeworks/multi-targetframeworks/multi-targetframeworks.csproj b/test/E2ETest/testassets/projects/multi-targetframeworks/multi-targetframeworks/multi-targetframeworks.csproj index 55ff0baf..d8c694bc 100644 --- a/test/E2ETest/testassets/projects/multi-targetframeworks/multi-targetframeworks/multi-targetframeworks.csproj +++ b/test/E2ETest/testassets/projects/multi-targetframeworks/multi-targetframeworks/multi-targetframeworks.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1;netcoreapp2.1 + net6.0;netcoreapp2.1 MultiTargetFrameworks diff --git a/test/E2ETest/testassets/projects/multi-targetframeworks/tye-with-netcoreapp31.yaml b/test/E2ETest/testassets/projects/multi-targetframeworks/tye-with-netcoreapp31.yaml index 2aedef8d..71daa328 100644 --- a/test/E2ETest/testassets/projects/multi-targetframeworks/tye-with-netcoreapp31.yaml +++ b/test/E2ETest/testassets/projects/multi-targetframeworks/tye-with-netcoreapp31.yaml @@ -6,4 +6,4 @@ services: project: multi-targetframeworks/multi-targetframeworks.csproj buildProperties: - name: TargetFramework - value: netcoreapp3.1 + value: net6.0 diff --git a/test/E2ETest/testassets/projects/multirepo/results/results.csproj b/test/E2ETest/testassets/projects/multirepo/results/results.csproj index 679a08e6..5a4165f2 100644 --- a/test/E2ETest/testassets/projects/multirepo/results/results.csproj +++ b/test/E2ETest/testassets/projects/multirepo/results/results.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Results diff --git a/test/E2ETest/testassets/projects/multirepo/vote/vote.csproj b/test/E2ETest/testassets/projects/multirepo/vote/vote.csproj index ed4c23aa..11a46dfc 100644 --- a/test/E2ETest/testassets/projects/multirepo/vote/vote.csproj +++ b/test/E2ETest/testassets/projects/multirepo/vote/vote.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Vote diff --git a/test/E2ETest/testassets/projects/multirepo/worker/worker.csproj b/test/E2ETest/testassets/projects/multirepo/worker/worker.csproj index fe7d9b49..e6ccfe0f 100644 --- a/test/E2ETest/testassets/projects/multirepo/worker/worker.csproj +++ b/test/E2ETest/testassets/projects/multirepo/worker/worker.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 dotnet-worker-A47A7C4B-4BF2-4243-9BBE-E6B3CB3E9C6F Worker diff --git a/test/E2ETest/testassets/projects/nginx-ingress/ApplicationA/ApplicationA.csproj b/test/E2ETest/testassets/projects/nginx-ingress/ApplicationA/ApplicationA.csproj index 92605c5a..e948168d 100644 --- a/test/E2ETest/testassets/projects/nginx-ingress/ApplicationA/ApplicationA.csproj +++ b/test/E2ETest/testassets/projects/nginx-ingress/ApplicationA/ApplicationA.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/nginx-ingress/ApplicationB/ApplicationB.csproj b/test/E2ETest/testassets/projects/nginx-ingress/ApplicationB/ApplicationB.csproj index 92605c5a..e948168d 100644 --- a/test/E2ETest/testassets/projects/nginx-ingress/ApplicationB/ApplicationB.csproj +++ b/test/E2ETest/testassets/projects/nginx-ingress/ApplicationB/ApplicationB.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/project-types/app/app.csproj b/test/E2ETest/testassets/projects/project-types/app/app.csproj index 92605c5a..e948168d 100644 --- a/test/E2ETest/testassets/projects/project-types/app/app.csproj +++ b/test/E2ETest/testassets/projects/project-types/app/app.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 diff --git a/test/E2ETest/testassets/projects/project-types/class-library/class-library.csproj b/test/E2ETest/testassets/projects/project-types/class-library/class-library.csproj index 1ed8b4e2..2084800b 100644 --- a/test/E2ETest/testassets/projects/project-types/class-library/class-library.csproj +++ b/test/E2ETest/testassets/projects/project-types/class-library/class-library.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 class_library diff --git a/test/E2ETest/testassets/projects/project-types/test-project/test-project.csproj b/test/E2ETest/testassets/projects/project-types/test-project/test-project.csproj index 72961ab9..9c5c6b3f 100644 --- a/test/E2ETest/testassets/projects/project-types/test-project/test-project.csproj +++ b/test/E2ETest/testassets/projects/project-types/test-project/test-project.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 test_project false diff --git a/test/E2ETest/testassets/projects/single-phase-dockerfile-args-duplicates/single-phase-dockerfile-args.csproj b/test/E2ETest/testassets/projects/single-phase-dockerfile-args-duplicates/single-phase-dockerfile-args.csproj index ffa96582..ec070fc5 100644 --- a/test/E2ETest/testassets/projects/single-phase-dockerfile-args-duplicates/single-phase-dockerfile-args.csproj +++ b/test/E2ETest/testassets/projects/single-phase-dockerfile-args-duplicates/single-phase-dockerfile-args.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 single_phase_dockerfile_args diff --git a/test/E2ETest/testassets/projects/single-phase-dockerfile-args/single-phase-dockerfile-args.csproj b/test/E2ETest/testassets/projects/single-phase-dockerfile-args/single-phase-dockerfile-args.csproj index ffa96582..ec070fc5 100644 --- a/test/E2ETest/testassets/projects/single-phase-dockerfile-args/single-phase-dockerfile-args.csproj +++ b/test/E2ETest/testassets/projects/single-phase-dockerfile-args/single-phase-dockerfile-args.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 single_phase_dockerfile_args diff --git a/test/E2ETest/testassets/projects/single-phase-dockerfile-multi-args/single-phase-dockerfile-multi-args.csproj b/test/E2ETest/testassets/projects/single-phase-dockerfile-multi-args/single-phase-dockerfile-multi-args.csproj index ffa96582..ec070fc5 100644 --- a/test/E2ETest/testassets/projects/single-phase-dockerfile-multi-args/single-phase-dockerfile-multi-args.csproj +++ b/test/E2ETest/testassets/projects/single-phase-dockerfile-multi-args/single-phase-dockerfile-multi-args.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 single_phase_dockerfile_args diff --git a/test/E2ETest/testassets/projects/single-phase-dockerfile/single-phase-dockerfile.csproj b/test/E2ETest/testassets/projects/single-phase-dockerfile/single-phase-dockerfile.csproj index 6c326b1d..eb601583 100644 --- a/test/E2ETest/testassets/projects/single-phase-dockerfile/single-phase-dockerfile.csproj +++ b/test/E2ETest/testassets/projects/single-phase-dockerfile/single-phase-dockerfile.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 single_phase_dockerfile diff --git a/test/E2ETest/testassets/projects/single-project/test-project/test-project.csproj b/test/E2ETest/testassets/projects/single-project/test-project/test-project.csproj index 86df20c0..4d2984aa 100644 --- a/test/E2ETest/testassets/projects/single-project/test-project/test-project.csproj +++ b/test/E2ETest/testassets/projects/single-project/test-project/test-project.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 test_project diff --git a/test/E2ETest/testassets/projects/volume-test/volume-test.csproj b/test/E2ETest/testassets/projects/volume-test/volume-test.csproj index 50570be1..5d1a393d 100644 --- a/test/E2ETest/testassets/projects/volume-test/volume-test.csproj +++ b/test/E2ETest/testassets/projects/volume-test/volume-test.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 volume_test diff --git a/test/E2ETest/testassets/projects/web-app/web-app.csproj b/test/E2ETest/testassets/projects/web-app/web-app.csproj index d6bda1c7..26d23608 100644 --- a/test/E2ETest/testassets/projects/web-app/web-app.csproj +++ b/test/E2ETest/testassets/projects/web-app/web-app.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 web_app diff --git a/test/Microsoft.Tye.Extensions.Configuration.Tests/Microsoft.Tye.Extensions.Configuration.Tests.csproj b/test/Microsoft.Tye.Extensions.Configuration.Tests/Microsoft.Tye.Extensions.Configuration.Tests.csproj index dffc8b0d..62b5242c 100644 --- a/test/Microsoft.Tye.Extensions.Configuration.Tests/Microsoft.Tye.Extensions.Configuration.Tests.csproj +++ b/test/Microsoft.Tye.Extensions.Configuration.Tests/Microsoft.Tye.Extensions.Configuration.Tests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 true diff --git a/test/Test.Infrastructure/Test.Infrastructure.csproj b/test/Test.Infrastructure/Test.Infrastructure.csproj index 8cc2cfb9..bf67871a 100644 --- a/test/Test.Infrastructure/Test.Infrastructure.csproj +++ b/test/Test.Infrastructure/Test.Infrastructure.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net6.0 false XUnit disable diff --git a/test/UnitTests/Microsoft.Tye.UnitTests.csproj b/test/UnitTests/Microsoft.Tye.UnitTests.csproj index c526b119..d2addfef 100644 --- a/test/UnitTests/Microsoft.Tye.UnitTests.csproj +++ b/test/UnitTests/Microsoft.Tye.UnitTests.csproj @@ -1,7 +1,7 @@ - netcoreapp3.1 + net6.0 Microsoft.Tye.UnitTests true true