Skip to content

Commit 457218b

Browse files
authored
GetReferenceAssemblyPaths continues on error in design-time builds (#8660)
Contributes to dotnet/sdk#19506 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. Tested locally. See discussion in linked issue for further details.
1 parent b3ac080 commit 457218b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tasks/Microsoft.Common.CurrentVersion.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
12321232
RootPath="$(TargetFrameworkRootPath)"
12331233
TargetFrameworkFallbackSearchPaths="$(TargetFrameworkFallbackSearchPaths)"
12341234
BypassFrameworkInstallChecks="$(BypassFrameworkInstallChecks)"
1235-
>
1235+
ContinueOnError="!$(BuildingProject)">
12361236
<Output TaskParameter="ReferenceAssemblyPaths" PropertyName="_TargetFrameworkDirectories"/>
12371237
<Output TaskParameter="FullFrameworkReferenceAssemblyPaths" PropertyName="_FullFrameworkReferenceAssemblyPaths"/>
12381238
<Output TaskParameter="TargetFrameworkMonikerDisplayName" PropertyName="TargetFrameworkMonikerDisplayName" Condition="'$(TargetFrameworkMonikerDisplayName)' == ''"/>

0 commit comments

Comments
 (0)