From b77e7b304c66fa0671bff25a201db5071a019b6a Mon Sep 17 00:00:00 2001 From: "Cynthia Z E MacLeod (C3D)" Date: Tue, 10 Jun 2025 23:03:30 +0100 Subject: [PATCH 1/2] Use UsingMSBuildSDKSystemWeb property to avoid ASPIRE004 warning. Rather than supressing the warning, set the property `_IsExecutable` on projects based on `MSBuild.SDK.SystemWeb` when calling the `GetTargetFrameworksWithPlatformForSingleTargetFramework` property which is used in the call to get `AdditionalPropertiesFromProject` which is used in the `GetNonExecutableReferences` task which returns project references which have this set to false. `_ValidateAspireHostProjectResources` then triggers the `ASPIRE004` warning for each such project. --- samples/Directory.Build.props | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/samples/Directory.Build.props b/samples/Directory.Build.props index 08f044f9e3..31bff79bd3 100644 --- a/samples/Directory.Build.props +++ b/samples/Directory.Build.props @@ -16,10 +16,14 @@ Overwrite - - - ASPIRE004;$(NoWarn) - + + + + + + <_IsExecutable>true + + $(NoWarn);NU1507;NU1902 From 242df08f04a22b9f3a7b3b3ed0ea0d40679ff6fe Mon Sep 17 00:00:00 2001 From: Cynthia MacLeod Date: Thu, 12 Jun 2025 00:12:39 +0100 Subject: [PATCH 2/2] Update Directory.Build.props Fix spelling mistakes --- samples/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/Directory.Build.props b/samples/Directory.Build.props index 31bff79bd3..d1faa50303 100644 --- a/samples/Directory.Build.props +++ b/samples/Directory.Build.props @@ -19,7 +19,7 @@ - + <_IsExecutable>true