From 667f661140f3b94870147f0ef30b2e42bc7d6377 Mon Sep 17 00:00:00 2001
From: Norm Johanson
-> dotnet lambda-test-tool-3.1 --help -AWS .NET Core 3.1 Mock Lambda Test Tool (0.10.0) +> dotnet lambda-test-tool-6.0 --help +AWS .NET Core 6.0 Mock Lambda Test Tool (@Amazon.Lambda.TestTool.Utils.DetermineToolVersion()) The .NET Lambda Test Tool can be launched in 2 modes. The default mode is to launch a web interface to select the Lambda code to execute with in the Lambda test tool. The second mode skips using the web interface and the Lambda code is identified @@ -144,8 +144,8 @@ These options are valid in the no web interface mode. "Mock Lambda Test Tool": { "commandName": "Executable", "commandLineArgs": "--no-ui --payload payload.json", - "workingDirectory": ".\\bin\\$(Configuration)\\netcoreapp3.1", - "executablePath": "C:\\Users\\%USERNAME%\\.dotnet\\tools\\dotnet-lambda-test-tool-3.1.exe" + "workingDirectory": ".\\bin\\$(Configuration)\\net6.0", + "executablePath": "C:\\Users\\%USERNAME%\\.dotnet\\tools\\dotnet-lambda-test-tool-6.0.exe" } } } diff --git a/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Startup.cs b/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Startup.cs index e8815e74c..ac73ed7f5 100644 --- a/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Startup.cs +++ b/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool.BlazorTester/Startup.cs @@ -5,6 +5,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.FileProviders; +using Microsoft.Extensions.Options; using System; using System.Diagnostics; using System.IO; @@ -84,14 +85,30 @@ public void ConfigureServices(IServiceCollection services) services.AddBlazoredModal(); +#if NET8_0_OR_GREATER + // Starting with .NET 8 how the IFileProvider is configured for Blazor + // to serve the Blazor embedded content was changed. The previous version + // of using the PostConfigure no longer works because the "o.FileProvider" is null. + // Using this IPostConfigureOptionsservice approach does not + // work in .NET versions before .NET 8. + // For further context checkout this GitHub issue. + // https://github.com/dotnet/aspnetcore/issues/51794 + services.AddTransient , ConfigureStaticFilesOptions>(); +#else services.AddOptions () .PostConfigure(o => { var fileProvider = new ManifestEmbeddedFileProvider(typeof(Startup).Assembly, "wwwroot"); + var f1 = fileProvider.GetFileInfo("_framework/blazor.server.js"); + // Make sure we don't remove the existing file providers (blazor needs this) - o.FileProvider = new CompositeFileProvider(o.FileProvider, fileProvider); + o.FileProvider = new CompositeFileProvider(fileProvider); + + var f = o.FileProvider.GetFileInfo("_framework/blazor.server.js"); + Console.WriteLine(f.Name); }); +#endif } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. @@ -114,5 +131,31 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) endpoints.MapFallbackToPage("/_Host"); }); } + +#if NET8_0_OR_GREATER + internal class ConfigureStaticFilesOptions : IPostConfigureOptions + { + public ConfigureStaticFilesOptions(IWebHostEnvironment environment) + { + Environment = environment; + } + + public IWebHostEnvironment Environment { get; } + + public void PostConfigure(string name, StaticFileOptions options) + { + name = name ?? throw new ArgumentNullException(nameof(name)); + options = options ?? throw new ArgumentNullException(nameof(options)); + + if (name != Options.DefaultName) + { + return; + } + + var fileProvider = new ManifestEmbeddedFileProvider(typeof(Startup).Assembly, "wwwroot"); + Environment.WebRootFileProvider = fileProvider; + } + } +#endif } } diff --git a/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj b/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj index ee5b0b1fa..4aed79475 100644 --- a/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj +++ b/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj @@ -3,7 +3,7 @@ - @@ -19,25 +19,18 @@netcoreapp3.1;net5.0;net6.0;net7.0 +net6.0;net7.0;net8.0 Common code for the AWS .NET Core Lambda Mock Test Tool. 1701;1702;1591;1587;3021;NU5100;CS1591 - - - -- - - -netcoreapp3.1 -- net5.0 -+ + net6.0 + -net7.0 +- +- + net8.0 +@@ -46,6 +39,10 @@ + + + + diff --git a/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/TestToolStartup.cs b/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/TestToolStartup.cs index 4b748fe5a..b130addb9 100644 --- a/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/TestToolStartup.cs +++ b/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/TestToolStartup.cs @@ -54,28 +54,16 @@ public static void Startup(string productName, Action var lambdaAssemblyDirectory = commandOptions.Path ?? Directory.GetCurrentDirectory(); -#if NETCOREAPP3_1 - var targetFramework = "netcoreapp3.1"; -#elif NET5_0 - var targetFramework = "net5.0"; -#elif NET6_0 +#if NET6_0 var targetFramework = "net6.0"; #elif NET7_0 var targetFramework = "net7.0"; +#elif NET8_0 + var targetFramework = "net8.0"; #endif - // Check to see if running in debug mode from this project's directory which means the test tool is being debugged. - // To make debugging easier pick one of the test Lambda projects. - if (lambdaAssemblyDirectory.EndsWith("Amazon.Lambda.TestTool.WebTester21")) - { - lambdaAssemblyDirectory = Path.Combine(lambdaAssemblyDirectory, $"../../tests/LambdaFunctions/netcore21/S3EventFunction/bin/Debug/{targetFramework}"); - } - else if (lambdaAssemblyDirectory.EndsWith("Amazon.Lambda.TestTool.WebTester31")) - { - lambdaAssemblyDirectory = Path.Combine(lambdaAssemblyDirectory, $"../../tests/LambdaFunctions/netcore31/S3EventFunction/bin/Debug/{targetFramework}"); - } // If running in the project directory select the build directory so the deps.json file can be found. - else if (Utils.IsProjectDirectory(lambdaAssemblyDirectory)) + if (Utils.IsProjectDirectory(lambdaAssemblyDirectory)) { lambdaAssemblyDirectory = Path.Combine(lambdaAssemblyDirectory, $"bin/Debug/{targetFramework}"); } diff --git a/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/Utils.cs b/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/Utils.cs index ebc5528b8..41756ae38 100644 --- a/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/Utils.cs +++ b/Tools/LambdaTestTool/src/Amazon.Lambda.TestTool/Utils.cs @@ -32,7 +32,15 @@ public static string DetermineToolVersion() // ignored } - return attribute?.InformationalVersion; + var version = attribute?.InformationalVersion; + + // Check to see if the version has a git commit id suffix and if so remove it. + if (version == null && version.IndexOf('+') != -1) + { + version = version.Substring(0, version.IndexOf('+')); + } + + return version; } /// diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.BlazorTester.Tests/Amazon.Lambda.TestTool.BlazorTester.Tests.csproj b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.BlazorTester.Tests/Amazon.Lambda.TestTool.BlazorTester.Tests.csproj index babfcd5ed..6bbb530ad 100644 --- a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.BlazorTester.Tests/Amazon.Lambda.TestTool.BlazorTester.Tests.csproj +++ b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.BlazorTester.Tests/Amazon.Lambda.TestTool.BlazorTester.Tests.csproj @@ -1,7 +1,7 @@ - diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NETCore31/Amazon.Lambda.TestTool.Tests.NETCore31.csproj b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NETCore31/Amazon.Lambda.TestTool.Tests.NETCore31.csproj index 7317c37d1..e9e860ac9 100644 --- a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NETCore31/Amazon.Lambda.TestTool.Tests.NETCore31.csproj +++ b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NETCore31/Amazon.Lambda.TestTool.Tests.NETCore31.csproj @@ -24,11 +24,6 @@net6.0 +net6.0;net8.0 false - - - - - diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/Amazon.Lambda.TestTool.Tests.NET6.csproj b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/Amazon.Lambda.TestTool.Tests.csproj similarity index 53% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/Amazon.Lambda.TestTool.Tests.NET6.csproj rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/Amazon.Lambda.TestTool.Tests.csproj index d8521f1db..d2974115a 100644 --- a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/Amazon.Lambda.TestTool.Tests.NET6.csproj +++ b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/Amazon.Lambda.TestTool.Tests.csproj @@ -1,10 +1,8 @@ - @@ -23,7 +21,14 @@net6.0 +net6.0;net8.0 enable -enable -false - + + + + + + + + diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/AwsServiceTests.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/AwsServiceTests.cs similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/AwsServiceTests.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/AwsServiceTests.cs diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/CommandLineParserTests.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/CommandLineParserTests.cs similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/CommandLineParserTests.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/CommandLineParserTests.cs diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/ConsoleCaptureTests.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/ConsoleCaptureTests.cs similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/ConsoleCaptureTests.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/ConsoleCaptureTests.cs diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/DefaultsFileParseTests.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/DefaultsFileParseTests.cs similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/DefaultsFileParseTests.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/DefaultsFileParseTests.cs diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/DlqMonitorTests.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/DlqMonitorTests.cs similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/DlqMonitorTests.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/DlqMonitorTests.cs diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/InvokeFunctionTests.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/InvokeFunctionTests.cs similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/InvokeFunctionTests.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/InvokeFunctionTests.cs diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/LambdaAssemblyPathTests.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/LambdaAssemblyPathTests.cs similarity index 93% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/LambdaAssemblyPathTests.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/LambdaAssemblyPathTests.cs index e47c4dcf4..f50067427 100644 --- a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/LambdaAssemblyPathTests.cs +++ b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/LambdaAssemblyPathTests.cs @@ -1,4 +1,4 @@ -namespace Amazon.Lambda.TestTool.Tests.NET6 +namespace Amazon.Lambda.TestTool.Tests { public class LambdaAssemblyPathTests { diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/LoadLambdaFunctionTests.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/LoadLambdaFunctionTests.cs similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/LoadLambdaFunctionTests.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/LoadLambdaFunctionTests.cs diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/NoUiStartupTests.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/NoUiStartupTests.cs similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/NoUiStartupTests.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/NoUiStartupTests.cs diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/SampleRequestTests.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/SampleRequestTests.cs similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/SampleRequestTests.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/SampleRequestTests.cs diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/SourceGeneratorTests.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/SourceGeneratorTests.cs similarity index 88% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/SourceGeneratorTests.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/SourceGeneratorTests.cs index e6d6bdfdc..d6e8d86e6 100644 --- a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/SourceGeneratorTests.cs +++ b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/SourceGeneratorTests.cs @@ -1,4 +1,4 @@ -namespace Amazon.Lambda.TestTool.Tests.NET6 +namespace Amazon.Lambda.TestTool.Tests { public class SourceGeneratorTests { @@ -10,7 +10,7 @@ public void SourceGeneratorInputAndOutput() Mode = TestToolStartup.RunConfiguration.RunMode.Test, OutputWriter = new StringWriter() }; - var buildPath = Path.GetFullPath($"../../../../LambdaFunctions/net6/SourceGeneratorExample/bin/Debug/net6.0"); + var buildPath = Path.GetFullPath($"../../../../LambdaFunctions/SourceGeneratorExample/bin/Debug/{TestUtils.GetTargetFramework()}"); TestToolStartup.Startup("Unit Tests", null, new string[] { "--path", buildPath, "--no-ui", "--payload", "{\"Name\" : \"FooBar\"}", "--config-file", "SourceGeneratorInputAndOutput.json" }, runConfiguration); Assert.Contains("Response = FooBar", runConfiguration.OutputWriter.ToString()); @@ -24,7 +24,7 @@ public void SourceGeneratorAsyncInputOnly() Mode = TestToolStartup.RunConfiguration.RunMode.Test, OutputWriter = new StringWriter() }; - var buildPath = Path.GetFullPath($"../../../../LambdaFunctions/net6/SourceGeneratorExample/bin/Debug/net6.0"); + var buildPath = Path.GetFullPath($"../../../../LambdaFunctions/SourceGeneratorExample/bin/Debug/{TestUtils.GetTargetFramework()}"); TestToolStartup.Startup("Unit Tests", null, new string[] { "--path", buildPath, "--no-ui", "--payload", "{\"Name\" : \"FooBar\"}", "--config-file", "SourceGeneratorAsyncInputOnly.json" }, runConfiguration); Assert.Contains("Calling function with:", runConfiguration.OutputWriter.ToString()); diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/TestFiles/MultipleDepsJsonFile/Dependency.txt b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestFiles/MultipleDepsJsonFile/Dependency.txt similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/TestFiles/MultipleDepsJsonFile/Dependency.txt rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestFiles/MultipleDepsJsonFile/Dependency.txt diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/TestFiles/MultipleDepsJsonFile/LambdaDemo.Api1.deps.json b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestFiles/MultipleDepsJsonFile/LambdaDemo.Api1.deps.json similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/TestFiles/MultipleDepsJsonFile/LambdaDemo.Api1.deps.json rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestFiles/MultipleDepsJsonFile/LambdaDemo.Api1.deps.json diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/TestFiles/MultipleDepsJsonFile/LambdaDemo.Api2.deps.json b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestFiles/MultipleDepsJsonFile/LambdaDemo.Api2.deps.json similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/TestFiles/MultipleDepsJsonFile/LambdaDemo.Api2.deps.json rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestFiles/MultipleDepsJsonFile/LambdaDemo.Api2.deps.json diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/TestFiles/MultipleDepsJsonFile/LambdaDemo.deps.json b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestFiles/MultipleDepsJsonFile/LambdaDemo.deps.json similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/TestFiles/MultipleDepsJsonFile/LambdaDemo.deps.json rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestFiles/MultipleDepsJsonFile/LambdaDemo.deps.json diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/TestFiles/SingleDepsJsonFile/LambdaDemo.deps.json b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestFiles/SingleDepsJsonFile/LambdaDemo.deps.json similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/TestFiles/SingleDepsJsonFile/LambdaDemo.deps.json rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestFiles/SingleDepsJsonFile/LambdaDemo.deps.json diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/TestUtils.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestUtils.cs similarity index 85% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/TestUtils.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestUtils.cs index 2b21b094f..23387ebf8 100644 --- a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/TestUtils.cs +++ b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/TestUtils.cs @@ -70,20 +70,23 @@ public static bool ProfileTestsEnabled public static string GetLambdaFunctionSourceFile(string projectName, string fileName) { -#if NETCORE_2_1 - return Path.GetFullPath($"../../../../LambdaFunctions/netcore21/{projectName}/{fileName}"); -#elif NETCORE_3_1 - return Path.GetFullPath($"../../../../LambdaFunctions/netcore31/{projectName}/{fileName}"); -#endif + return Path.GetFullPath($"../../../../LambdaFunctions/{projectName}/{fileName}"); } public static string GetLambdaFunctionBuildPath(string projectName) { -#if NETCORE_2_1 - return Path.GetFullPath($"../../../../LambdaFunctions/netcore21/{projectName}/bin/Debug/netcoreapp2.1"); -#elif NETCORE_3_1 - return Path.GetFullPath($"../../../../LambdaFunctions/netcore31/{projectName}/bin/Debug/netcoreapp3.1"); -#endif + return Path.GetFullPath($"../../../../LambdaFunctions/{projectName}/bin/Debug/{GetTargetFramework()}"); + } + + public static string GetTargetFramework() + { +#if NET6_0 + return "net6.0"; +#elif NET8_0 + return "net8.0"; +#else + Compile error you need to add a new target framework +#endif } } } \ No newline at end of file diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/Usings.cs b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/Usings.cs similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.NET6/Usings.cs rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/Usings.cs diff --git a/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/call-valuescontroller-request.txt b/Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/call-valuescontroller-request.txt similarity index 100% rename from Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests.Shared/call-valuescontroller-request.txt rename to Tools/LambdaTestTool/tests/Amazon.Lambda.TestTool.Tests/call-valuescontroller-request.txt diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/AspNetCoreAPIExample.csproj b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/AspNetCoreAPIExample.csproj similarity index 84% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/AspNetCoreAPIExample.csproj rename to Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/AspNetCoreAPIExample.csproj index 619026897..985cf50bb 100644 --- a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/AspNetCoreAPIExample.csproj +++ b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/AspNetCoreAPIExample.csproj @@ -1,6 +1,6 @@ - + - netcoreapp3.1 +net6.0;net8.0 true Lambda diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/Controllers/ValuesController.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/Controllers/ValuesController.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/Controllers/ValuesController.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/Controllers/ValuesController.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/FakeDependency.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/FakeDependency.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/FakeDependency.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/FakeDependency.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/LambdaEntryPoint.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/LambdaEntryPoint.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/LambdaEntryPoint.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/LambdaEntryPoint.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/LocalEntryPoint.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/LocalEntryPoint.cs similarity index 63% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/LocalEntryPoint.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/LocalEntryPoint.cs index 8dba94e0e..dd8c63772 100644 --- a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/LocalEntryPoint.cs +++ b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/LocalEntryPoint.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; @@ -16,11 +17,11 @@ public static void Main(string[] args) CreateHostBuilder(args).Build().Run(); } - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); + public static WebApplicationBuilder CreateHostBuilder(string[] args) + { + var builder = WebApplication.CreateBuilder(args); + builder.WebHost.UseStartup (); + return builder; + } } } diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/Readme.md b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/Readme.md similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/Readme.md rename to Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/Readme.md diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/Startup.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/Startup.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/Startup.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/Startup.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/appsettings.Development.json b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/appsettings.Development.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/appsettings.Development.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/appsettings.Development.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/appsettings.json b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/appsettings.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/appsettings.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/appsettings.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/aws-lambda-tools-defaults.json b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/aws-lambda-tools-defaults.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/aws-lambda-tools-defaults.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/aws-lambda-tools-defaults.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/serverless.template b/Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/serverless.template similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/AspNetCoreAPIExample/serverless.template rename to Tools/LambdaTestTool/tests/LambdaFunctions/AspNetCoreAPIExample/serverless.template diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/AsyncMethods.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/AsyncMethods.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/AsyncMethods.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/AsyncMethods.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/ErrorFunctions.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/ErrorFunctions.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/ErrorFunctions.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/ErrorFunctions.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/FunctionSignatureExamples.csproj b/Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/FunctionSignatureExamples.csproj similarity index 90% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/FunctionSignatureExamples.csproj rename to Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/FunctionSignatureExamples.csproj index eea78b7d1..f8bd12dc2 100644 --- a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/FunctionSignatureExamples.csproj +++ b/Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/FunctionSignatureExamples.csproj @@ -1,6 +1,6 @@ - netcoreapp3.1 +net6.0;net8.0 true diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/InstanceMethods.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/InstanceMethods.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/InstanceMethods.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/InstanceMethods.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/StaticMethods.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/StaticMethods.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/StaticMethods.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/StaticMethods.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/aws-lambda-tools-defaults.json b/Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/aws-lambda-tools-defaults.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/FunctionSignatureExamples/aws-lambda-tools-defaults.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/FunctionSignatureExamples/aws-lambda-tools-defaults.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/S3EventFunction/Function.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/S3EventFunction/Function.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/S3EventFunction/Function.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/S3EventFunction/Function.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/S3EventFunction/Readme.md b/Tools/LambdaTestTool/tests/LambdaFunctions/S3EventFunction/Readme.md similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/S3EventFunction/Readme.md rename to Tools/LambdaTestTool/tests/LambdaFunctions/S3EventFunction/Readme.md diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/S3EventFunction/S3EventFunction.csproj b/Tools/LambdaTestTool/tests/LambdaFunctions/S3EventFunction/S3EventFunction.csproj similarity index 91% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/S3EventFunction/S3EventFunction.csproj rename to Tools/LambdaTestTool/tests/LambdaFunctions/S3EventFunction/S3EventFunction.csproj index 27e6eef57..9c246d91b 100644 --- a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/S3EventFunction/S3EventFunction.csproj +++ b/Tools/LambdaTestTool/tests/LambdaFunctions/S3EventFunction/S3EventFunction.csproj @@ -1,7 +1,7 @@ - diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/S3EventFunction/aws-lambda-tools-defaults.json b/Tools/LambdaTestTool/tests/LambdaFunctions/S3EventFunction/aws-lambda-tools-defaults.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/S3EventFunction/aws-lambda-tools-defaults.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/S3EventFunction/aws-lambda-tools-defaults.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/Functions/CreateItemFunction.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/Functions/CreateItemFunction.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/Functions/CreateItemFunction.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/Functions/CreateItemFunction.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/Functions/GetItemFunction.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/Functions/GetItemFunction.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/Functions/GetItemFunction.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/Functions/GetItemFunction.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/Functions/UpdateItemFunction.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/Functions/UpdateItemFunction.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/Functions/UpdateItemFunction.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/Functions/UpdateItemFunction.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/Program.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/Program.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/Program.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/Program.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/ServerlessFunctionTemplateYamlExample.csproj b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/ServerlessFunctionTemplateYamlExample.csproj similarity index 96% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/ServerlessFunctionTemplateYamlExample.csproj rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/ServerlessFunctionTemplateYamlExample.csproj index 2ce48636a..161f5ceb3 100644 --- a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/ServerlessFunctionTemplateYamlExample.csproj +++ b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/ServerlessFunctionTemplateYamlExample.csproj @@ -1,7 +1,7 @@netcoreapp3.1 +net6.0;net8.0 true - diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/Startup.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/Startup.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/Startup.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/Startup.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/aws-lambda-tools-defaults.json b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/aws-lambda-tools-defaults.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/aws-lambda-tools-defaults.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/aws-lambda-tools-defaults.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/env.configs.yml b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/env.configs.yml similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/env.configs.yml rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/env.configs.yml diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/serverless.yml b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/serverless.yml similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessFunctionTemplateYamlExample/serverless.yml rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessFunctionTemplateYamlExample/serverless.yml diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateExample/Functions.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateExample/Functions.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateExample/Functions.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateExample/Functions.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateExample/ServerlessTemplateExample.csproj b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateExample/ServerlessTemplateExample.csproj similarity index 91% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateExample/ServerlessTemplateExample.csproj rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateExample/ServerlessTemplateExample.csproj index a1c8ec607..47b338ce6 100644 --- a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateExample/ServerlessTemplateExample.csproj +++ b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateExample/ServerlessTemplateExample.csproj @@ -1,7 +1,7 @@netcoreapp3.1 +net6.0;net8.0 true Lambda - diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateExample/aws-lambda-tools-defaults.json b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateExample/aws-lambda-tools-defaults.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateExample/aws-lambda-tools-defaults.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateExample/aws-lambda-tools-defaults.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateExample/serverless.template b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateExample/serverless.template similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateExample/serverless.template rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateExample/serverless.template diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateYamlExample/Functions.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateYamlExample/Functions.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateYamlExample/Functions.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateYamlExample/Functions.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateYamlExample/ServerlessTemplateYamlExample.csproj b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateYamlExample/ServerlessTemplateYamlExample.csproj similarity index 90% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateYamlExample/ServerlessTemplateYamlExample.csproj rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateYamlExample/ServerlessTemplateYamlExample.csproj index b13de4b6f..50bf1f22e 100644 --- a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateYamlExample/ServerlessTemplateYamlExample.csproj +++ b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateYamlExample/ServerlessTemplateYamlExample.csproj @@ -1,7 +1,7 @@netcoreapp3.1 +net6.0;net8.0 true - diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateYamlExample/aws-lambda-tools-defaults.json b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateYamlExample/aws-lambda-tools-defaults.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateYamlExample/aws-lambda-tools-defaults.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateYamlExample/aws-lambda-tools-defaults.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateYamlExample/serverless.yaml b/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateYamlExample/serverless.yaml similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ServerlessTemplateYamlExample/serverless.yaml rename to Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateYamlExample/serverless.yaml diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/net6/SourceGeneratorExample/Function.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/SourceGeneratorExample/Function.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/net6/SourceGeneratorExample/Function.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/SourceGeneratorExample/Function.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/net6/SourceGeneratorExample/SourceGeneratorAsyncInputOnly.json b/Tools/LambdaTestTool/tests/LambdaFunctions/SourceGeneratorExample/SourceGeneratorAsyncInputOnly.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/net6/SourceGeneratorExample/SourceGeneratorAsyncInputOnly.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/SourceGeneratorExample/SourceGeneratorAsyncInputOnly.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/net6/SourceGeneratorExample/SourceGeneratorExample.csproj b/Tools/LambdaTestTool/tests/LambdaFunctions/SourceGeneratorExample/SourceGeneratorExample.csproj similarity index 91% rename from Tools/LambdaTestTool/tests/LambdaFunctions/net6/SourceGeneratorExample/SourceGeneratorExample.csproj rename to Tools/LambdaTestTool/tests/LambdaFunctions/SourceGeneratorExample/SourceGeneratorExample.csproj index 786c2c9c1..ddbfa1ba0 100644 --- a/Tools/LambdaTestTool/tests/LambdaFunctions/net6/SourceGeneratorExample/SourceGeneratorExample.csproj +++ b/Tools/LambdaTestTool/tests/LambdaFunctions/SourceGeneratorExample/SourceGeneratorExample.csproj @@ -1,8 +1,7 @@netcoreapp3.1 +net6.0;net8.0 true - net6.0 +net6.0;net8.0 enable -enable true Lambda diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/net6/SourceGeneratorExample/SourceGeneratorInputAndOutput.json b/Tools/LambdaTestTool/tests/LambdaFunctions/SourceGeneratorExample/SourceGeneratorInputAndOutput.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/net6/SourceGeneratorExample/SourceGeneratorInputAndOutput.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/SourceGeneratorExample/SourceGeneratorInputAndOutput.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/Function.cs b/Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/Function.cs similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/Function.cs rename to Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/Function.cs diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/Readme.md b/Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/Readme.md similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/Readme.md rename to Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/Readme.md diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/ToUpperFunc.csproj b/Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/ToUpperFunc.csproj similarity index 89% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/ToUpperFunc.csproj rename to Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/ToUpperFunc.csproj index e2a97df11..c7bbd56e4 100644 --- a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/ToUpperFunc.csproj +++ b/Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/ToUpperFunc.csproj @@ -1,7 +1,7 @@- diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/aws-lambda-tools-defaults.json b/Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/aws-lambda-tools-defaults.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/aws-lambda-tools-defaults.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/aws-lambda-tools-defaults.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/payload-sample.json b/Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/payload-sample.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/payload-sample.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/payload-sample.json diff --git a/Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/stream-function.json b/Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/stream-function.json similarity index 100% rename from Tools/LambdaTestTool/tests/LambdaFunctions/netcore31/ToUpperFunc/stream-function.json rename to Tools/LambdaTestTool/tests/LambdaFunctions/ToUpperFunc/stream-function.json diff --git a/buildtools/build.proj b/buildtools/build.proj index 8be09023c..e7552c3e0 100644 --- a/buildtools/build.proj +++ b/buildtools/build.proj @@ -168,11 +168,10 @@netcoreapp3.1 +net6.0;net8.0 true - - - + - + + @@ -181,17 +180,17 @@ - dotnet test + - dotnet test + - - + +