Skip to content

Commit af70e6c

Browse files
committed
Fix self contained bug
1 parent cb98714 commit af70e6c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.autover/changes/8a5204e4-83ec-45ac-8c75-27512ae9cdf8.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"Name": "Amazon.Lambda.Tools",
55
"Type": "Patch",
66
"ChangelogMessages": [
7-
"Update logic for finding project properties to use MSBuild instead of parsing the project file directly. See https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2022 for more details."
7+
"Update logic for finding project properties to use MSBuild instead of parsing the project file directly. See https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2022 for more details.",
8+
"Fix 'SelfContained' property reading logic to actually read the value from the properties. Previously we were only checking that the value could be parsed and not reading the actual value."
89
]
910
}
1011
]

src/Amazon.Common.DotNetCli.Tools/Utilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public static bool HasExplicitSelfContainedFlag(string projectLocation, string m
372372
var properties = LookupProjectProperties(projectLocation, "SelfContained");
373373
if (properties.TryGetValue("SelfContained", out var selfContained))
374374
{
375-
return bool.TryParse(selfContained, out _);
375+
return bool.TryParse(selfContained, out var isSelfContained) && isSelfContained;
376376
}
377377

378378
return false;

0 commit comments

Comments
 (0)