Skip to content

Commit

Permalink
Avoid "missing toolset" error in design-time builds (#42360)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjonescz authored Jul 26, 2024
1 parent 9a99a3b commit 3c35b9b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ Copyright (c) .NET Foundation. All rights reserved.
Condition="'@(PackageReference->AnyHaveMetadataValue('Identity', 'Microsoft.Net.Compilers.Toolset.Framework'))' == 'true'" />
</Target>

<Target Name="_CheckMicrosoftNetSdkCompilersToolsetPackageExists" Condition="'$(_NeedToDownloadMicrosoftNetSdkCompilersToolsetPackage)' == 'true'" BeforeTargets="CoreCompile">
<Target Name="_CheckMicrosoftNetSdkCompilersToolsetPackageExists"
Condition="'$(_NeedToDownloadMicrosoftNetSdkCompilersToolsetPackage)' == 'true' and '$(DesignTimeBuild)' != 'true'"
BeforeTargets="CoreCompile">
<!-- If users did not run restore or it failed to download the Microsoft.Net.Sdk.Compilers.Toolset package
(but they proceeded to build, e.g., in Visual Studio), display an error with suggestions how to fix the problem. -->
<NETSdkError ResourceName="MicrosoftNetSdkCompilersToolsetNotFound"
Expand Down

0 comments on commit 3c35b9b

Please sign in to comment.