File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1111 <_SdkLanguageTargetsMissing Condition =" '$(_SdkLanguageTargetsMissing)' == ''" >true</_SdkLanguageTargetsMissing >
1212 </PropertyGroup >
1313
14+ <!-- Check if the Common targets have been loaded, see https://github.com/onovotny/MSBuildSdkExtras/pull/186 -->
15+ <!-- https://github.com/microsoft/msbuild/blob/d42d3504057ef2b88dd4f68c4bfc5591371bd6fe/src/Tasks/Microsoft.Common.targets#L32-L43 -->
16+ <PropertyGroup Condition =" '$(CommonTargetsPath)' == '' Or '$(MSBuildVersion)' > = '16.0' " >
17+ <_SdkLanguageTargetsMissing Condition =" '$(CommonTargetsPath)'!=''" >false</_SdkLanguageTargetsMissing >
18+ <_SdkLanguageTargetsMissing Condition =" '$(_SdkLanguageTargetsMissing)' == ''" >true</_SdkLanguageTargetsMissing >
19+ </PropertyGroup >
20+
1421 <!-- Check to see if the Lang targets exist and if not, trigger an error on Compile -->
1522 <!-- We clear out the lang targets so the defaults are used for the error to show -->
16- <PropertyGroup Condition =" '$(_ExtrasSkipTargetsCheck)' != 'true' " >
23+ <PropertyGroup Condition =" '$(_ExtrasSkipTargetsCheck)' != 'true' and '$(_SdkLanguageTargetsMissing)' == 'true' " >
1724
1825 <!-- Reset LanguageTargets Eval-->
1926 <!-- https://github.com/dotnet/sdk/blob/581f5371dac022ad2b3e5bcdbb2e576bd73b5c4a/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.targets#L28-L37 -->
3037
3138 <!-- Import common targets so NuGet restore succeeds -->
3239 <!-- https://github.com/dotnet/sdk/blob/979eed136b786b6e2d77f567eb5a368952982740/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.targets#L33 -->
33- <Import Project =" $(LanguageTargets)" />
40+ <Import Condition = " '$(_SdkLanguageTargetsMissing)' == 'true' " Project =" $(LanguageTargets)" />
3441
3542
3643 <Target Name =" _ShowMissingLanguageTargetsError" BeforeTargets =" _CheckForUnsupportedTargetFramework" Condition =" '$(_SdkLanguageTargetsMissing)' == 'true' and '$(_SdkIgnoreMissingLanguageTargetsError)' != 'true' " >
You can’t perform that action at this time.
0 commit comments