ld)'!='true'">
    <PrepareForBuildDependsOn>Desktop_PlatformPrepareForBuild;$(PrepareForBuildDependsOn)</PrepareForBuildDependsOn>
  </PropertyGroup>

  <Target Name="Desktop_PlatformPrepareForBuild" DependsOnTargets="$(Desktop_PlatformPrepareForBuildDependsOn)">
    <!-- For desktop projects targeting win 10 SDK, check if the win10 SDK props are found -->
    <PropertyGroup Condition="'$(TargetPlatformVersion)' != '8.1' and '$(AppContainerApplication)' != 'true'" >
        <MissingSDKProps Condition="!Exists('$(WindowsSdkDir)\DesignTime\CommonConfiguration\Neutral\UAP\$(TargetPlatformVersion)\UAP.props')">true</MissingSDKProps>
    </PropertyGroup>
    <!-- For desktop projects targeting win 8.1 SDK, check if the win8.1 SDK props are found -->
    <PropertyGroup Condition="'$(TargetPlatformVersion)' == '8.1' and '$(AppContainerApplication)' != 'true'" >
        <MissingSDKProps Condition="!Exists('$(WindowsSdkDir)\DesignTime\CommonConfiguration\Neutral\Windows.props')">true</MissingSDKProps>
    </PropertyGroup>

    <VCMessage Code="MSB8036" Type="Error" Arguments="$(TargetPlatformVersion)" Condition="$(MissingSDKProps) == 'true'" />
  </Target>

  <Import Project="$(MSBuildThisFileDirectory)ImportAfter\*.targets" Condition="Exists('$(MSBuildThisFileDirectory)ImportAfter')" />

</Project>
