From 614ef54e0f4fbd9087eb0ade4127a13a6671627c Mon Sep 17 00:00:00 2001 From: Drew Noakes Date: Thu, 13 Apr 2023 19:58:40 +1000 Subject: [PATCH] GetReferenceAssemblyPaths continues on error in design-time builds This fixes an issue where VS design-time builds would fail when reference assemblies could not be found. By allowing the design-time build to continue, the .NET Project System will the nominate a restore which may bring in a package that provides those reference assemblies. Without this addition, the task will fail and the build will end early, such that the restore does not occur and progress is not made. This helps when users do not have targeting packs installed (such as for out-of-support versions of .NET Framework, like v4.5). With this change, a reference assembly package (like `Microsoft.NETFramework.ReferenceAssemblies.net45`) may be downloaded for the user to compile against. --- src/Tasks/Microsoft.Common.CurrentVersion.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tasks/Microsoft.Common.CurrentVersion.targets b/src/Tasks/Microsoft.Common.CurrentVersion.targets index f36e079ea3b..3c88dc06d8b 100644 --- a/src/Tasks/Microsoft.Common.CurrentVersion.targets +++ b/src/Tasks/Microsoft.Common.CurrentVersion.targets @@ -1232,7 +1232,7 @@ Copyright (C) Microsoft Corporation. All rights reserved. RootPath="$(TargetFrameworkRootPath)" TargetFrameworkFallbackSearchPaths="$(TargetFrameworkFallbackSearchPaths)" BypassFrameworkInstallChecks="$(BypassFrameworkInstallChecks)" - > + ContinueOnError="!$(BuildingProject)">