diff --git a/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/SdkProjectDiscoveryTests.cs b/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/SdkProjectDiscoveryTests.cs
index 90f03bed81..a437da0414 100644
--- a/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/SdkProjectDiscoveryTests.cs
+++ b/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Discover/SdkProjectDiscoveryTests.cs
@@ -479,6 +479,51 @@ await TestDiscoverAsync(
);
}
+ [Fact]
+ public async Task DependenciesCanBeDiscoveredWithWindowsSpecificTfm()
+ {
+ await TestDiscoverAsync(
+ packages:
+ [
+ MockNuGetPackage.CreateSimplePackage("Some.Dependency", "1.2.3", "netstandard2.0"),
+ ],
+ startingDirectory: "src",
+ projectPath: "src/library.csproj",
+ files:
+ [
+ ("src/library.csproj", """
+
+
+ net9.0-windows
+
+
+
+
+
+ """)
+ ],
+ expectedProjects:
+ [
+ new()
+ {
+ FilePath = "library.csproj",
+ Dependencies =
+ [
+ new("Some.Dependency", "1.2.3", DependencyType.PackageReference, TargetFrameworks: ["net9.0-windows"], IsDirect: true),
+ ],
+ ImportedFiles = [],
+ Properties =
+ [
+ new("TargetFramework", "net9.0-windows", "src/library.csproj"),
+ ],
+ TargetFrameworks = ["net9.0-windows"],
+ ReferencedProjectPaths = [],
+ AdditionalFiles = [],
+ },
+ ]
+ );
+ }
+
private static async Task TestDiscoverAsync(string startingDirectory, string projectPath, TestFile[] files, ImmutableArray expectedProjects, MockNuGetPackage[]? packages = null)
{
using var testDirectory = await TemporaryDirectory.CreateWithContentsAsync(files);
diff --git a/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs b/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs
index cc261755fc..3d2d5a0859 100644
--- a/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs
+++ b/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core.Test/Utilities/MSBuildHelperTests.cs
@@ -606,6 +606,18 @@ public static IEnumerable