From 9fadf7a9a426f84bd3d4185442c8e00ac366c27a Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Wed, 10 Sep 2025 17:00:35 -0300 Subject: [PATCH] Fix error when file has no package references We were failing with an MSBuild error. --- src/SmallSharp/Sdk.targets | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SmallSharp/Sdk.targets b/src/SmallSharp/Sdk.targets index bd4ce7d..a40c2f7 100644 --- a/src/SmallSharp/Sdk.targets +++ b/src/SmallSharp/Sdk.targets @@ -9,7 +9,7 @@ @@ -21,7 +21,9 @@ <_PkgLines Include="@(_StartupFileLines)" Condition="$([MSBuild]::ValueOrDefault('%(Identity)', '').StartsWith('#:package '))" /> + + <_PkgReference Include="$([MSBuild]::ValueOrDefault('%(_PkgLines.Identity)', '').Substring(10))" />