From 2e59f087232e1496ff953344b432552571d58ad9 Mon Sep 17 00:00:00 2001 From: Oskar Josefsson Date: Tue, 4 Nov 2025 18:04:21 +0100 Subject: [PATCH 1/3] issue(#402) Add support for solutions migrated to slnx --- src/Amazon.Common.DotNetCli.Tools/Utilities.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Amazon.Common.DotNetCli.Tools/Utilities.cs b/src/Amazon.Common.DotNetCli.Tools/Utilities.cs index bf18c501..69b6685b 100644 --- a/src/Amazon.Common.DotNetCli.Tools/Utilities.cs +++ b/src/Amazon.Common.DotNetCli.Tools/Utilities.cs @@ -175,6 +175,11 @@ public static string GetSolutionDirectoryFullPath(string workingDirectory, strin return currentDirectory.TrimEnd('\\', '/'); } + if (Directory.EnumerateFiles(currentDirectory).Any(x => x.EndsWith(".slnx", StringComparison.OrdinalIgnoreCase))) + { + return currentDirectory.TrimEnd('\\', '/'); + } + DirectoryInfo dirInfo = Directory.GetParent(currentDirectory); if ((dirInfo == null) || !dirInfo.Exists) { From 6efe0140a456f53a122d07287e7142407a02605f Mon Sep 17 00:00:00 2001 From: Oskar Josefsson Date: Tue, 4 Nov 2025 18:04:25 +0100 Subject: [PATCH 2/3] issue(#402) Add support for solutions migrated to slnx --- .../Commands/BasePushDockerImageCommand.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Amazon.Common.DotNetCli.Tools/Commands/BasePushDockerImageCommand.cs b/src/Amazon.Common.DotNetCli.Tools/Commands/BasePushDockerImageCommand.cs index 95067d53..5942a91c 100644 --- a/src/Amazon.Common.DotNetCli.Tools/Commands/BasePushDockerImageCommand.cs +++ b/src/Amazon.Common.DotNetCli.Tools/Commands/BasePushDockerImageCommand.cs @@ -409,7 +409,7 @@ public static DockerDetails InspectDockerFile(IToolLogger logger, string project { var noSpaceLine = line.Replace(" ", ""); - if (noSpaceLine.StartsWith("COPY") && (noSpaceLine.EndsWith(".sln./") || (projectFilename != null && noSpaceLine.Contains("/" + projectFilename)))) + if (noSpaceLine.StartsWith("COPY") && (noSpaceLine.EndsWith(".sln./") || noSpaceLine.EndsWith(".slnx./") || (projectFilename != null && noSpaceLine.Contains("/" + projectFilename)))) { details.BuildFromSolutionDirectory = true; logger?.WriteLine("... Determined that docker build needs to be run from solution folder."); @@ -437,6 +437,9 @@ public static string DetermineSolutionDirectory(string projectLocation) { if (Directory.GetFiles(projectLocation, "*.sln", SearchOption.TopDirectoryOnly).Length != 0) return projectLocation; + + if (Directory.GetFiles(projectLocation, "*.slnx", SearchOption.TopDirectoryOnly).Length != 0) + return projectLocation; var parent = Directory.GetParent(projectLocation)?.FullName; if (parent == null) From be7c19b314993617b6c72476a0d8c648125e8609 Mon Sep 17 00:00:00 2001 From: Oskar Josefsson Date: Tue, 4 Nov 2025 18:38:13 +0100 Subject: [PATCH 3/3] issue(#402) Add change file --- .../changes/c102f28c-59f6-412c-b0e4-f4acd840367c.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .autover/changes/c102f28c-59f6-412c-b0e4-f4acd840367c.json diff --git a/.autover/changes/c102f28c-59f6-412c-b0e4-f4acd840367c.json b/.autover/changes/c102f28c-59f6-412c-b0e4-f4acd840367c.json new file mode 100644 index 00000000..38c2c08b --- /dev/null +++ b/.autover/changes/c102f28c-59f6-412c-b0e4-f4acd840367c.json @@ -0,0 +1,11 @@ +{ + "Projects": [ + { + "Name": "Amazon.Lambda.Tools", + "Type": "Patch", + "ChangelogMessages": [ + "Add support for solutions migrated to slnx" + ] + } + ] +} \ No newline at end of file