From fe49bd09d90618ec13249bef697a63bd1561c215 Mon Sep 17 00:00:00 2001
From: Andrij Abyzov <drolevar@gmail.com>
Date: Tue, 8 Aug 2023 12:08:26 +0200
Subject: [PATCH] Add .vdproj to the exclusion list

The projects with .vdproj extension are legacy installer projects which are not MSBuild-compatible, and yet they are supported even by the latest Visual Studio 2022. Running "nuget restore" on solutions containing such projects fails, unless "inclusionlist" mode is chosen. However "inclusionlist" option prevents certain other projects (e.g. .wixproj) from being restored. The .vdproj projects always have to be excluded from restore.
---
 src/NuGet.Core/NuGet.Build.Tasks/NuGet.targets | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/NuGet.Core/NuGet.Build.Tasks/NuGet.targets b/src/NuGet.Core/NuGet.Build.Tasks/NuGet.targets
index 807538365b5..97eed247c57 100644
--- a/src/NuGet.Core/NuGet.Build.Tasks/NuGet.targets
+++ b/src/NuGet.Core/NuGet.Build.Tasks/NuGet.targets
@@ -378,6 +378,7 @@ Copyright (c) .NET Foundation. All rights reserved.
        Condition=" '%(RestoreGraphProjectInputItems.Extension)' != '.metaproj'
                    AND '%(RestoreGraphProjectInputItems.Extension)' != '.shproj'
                    AND '%(RestoreGraphProjectInputItems.Extension)' != '.vcxitems'
+                   AND '%(RestoreGraphProjectInputItems.Extension)' != '.vdproj'
                    AND '%(RestoreGraphProjectInputItems.Extension)' != '' " />
     </ItemGroup>