Skip to content

Commit

Permalink
Ensure that MSBuildExtensionsPath is used directly in import for mult…
Browse files Browse the repository at this point in the history
…i-valued expansion
  • Loading branch information
Oren Novotny committed Jun 26, 2018
1 parent 88c1e02 commit 4d49dd2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
<_SdkLanguageTargets Condition="'$(_SdkLanguageSourceName)' == 'FSharp'">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.Portable.FSharp.Targets</_SdkLanguageTargets>
</PropertyGroup>

<Import Project="$(_SdkLanguageTargets)" Condition="Exists('$(_SdkLanguageTargets)')"/>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.$(_SdkLanguageSourceName).targets"
Condition="'$(_SdkLanguageSourceName)' != 'FSharp' and Exists('$(MSBuildExtensionsPath)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.$(_SdkLanguageSourceName).targets')"/>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.Portable.FSharp.Targets"
Condition="'$(_SdkLanguageSourceName)' == 'FSharp' and Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.Portable.FSharp.Targets')"/>
<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@
</PropertyGroup>

<PropertyGroup>
<!-- HACK: $(MSBuildExtensionsPath) for VS <= 14.0 -->
<_SdkMSBuildExtensionsPath>$(MSBuildProgramFiles32)\MSBuild</_SdkMSBuildExtensionsPath>
<_SdkLanguageTargets>$(MSBuildProgramFiles32)\MSBuild\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.$(_SdkLanguageSourceName).targets</_SdkLanguageTargets>
</PropertyGroup>

<PropertyGroup>
<_SdkLanguageTargets>$(_SdkMSBuildExtensionsPath)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.$(_SdkLanguageSourceName).targets</_SdkLanguageTargets>
</PropertyGroup>

<Import Project="$(_SdkLanguageTargets)" Condition="Exists('$(_SdkLanguageTargets)')"/>
<Import Project="$(MSBuildProgramFiles32)\MSBuild\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.$(_SdkLanguageSourceName).targets"
Condition="Exists('$(MSBuildProgramFiles32)\MSBuild\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.$(_SdkLanguageSourceName).targets')"/>
<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<_SdkLanguageTargets>$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.$(_SdkLanguageSourceName).targets</_SdkLanguageTargets>
</PropertyGroup>

<Import Project="$(_SdkLanguageTargets)" Condition="Exists('$(_SdkLanguageTargets)')"/>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.$(_SdkLanguageSourceName).targets"
Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.$(_SdkLanguageSourceName).targets')"/>
<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@
</PropertyGroup>

<PropertyGroup>
<!-- HACK: $(MSBuildExtensionsPath) for VS <= 14.0 -->
<_SdkMSBuildExtensionsPath>$(MSBuildProgramFiles32)\MSBuild</_SdkMSBuildExtensionsPath>
<_SdkLanguageTargets>$(MSBuildProgramFiles32)\MSBuild\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(_SdkLanguageSourceName).targets</_SdkLanguageTargets>
<_SdkLanguageOverridesTargets>$(MSBuildProgramFiles32)\MSBuild\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets</_SdkLanguageOverridesTargets>
</PropertyGroup>

<PropertyGroup>
<_SdkLanguageTargets>$(_SdkMSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(_SdkLanguageSourceName).targets</_SdkLanguageTargets>
<_SdkLanguageOverridesTargets>$(_SdkMSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets</_SdkLanguageOverridesTargets>
</PropertyGroup>

<Import Project="$(_SdkLanguageOverridesTargets)" Condition="Exists('$(_SdkLanguageOverridesTargets)')"/>
<Import Project="$(_SdkLanguageTargets)" Condition="Exists('$(_SdkLanguageTargets)')"/>
<Import Project="$(MSBuildProgramFiles32)\MSBuild\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets"
Condition="Exists('$(MSBuildProgramFiles32)\MSBuild\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets')"/>
<Import Project="$(MSBuildProgramFiles32)\MSBuild\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(_SdkLanguageSourceName).targets"
Condition="Exists('$(MSBuildProgramFiles32)\MSBuild\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(_SdkLanguageSourceName).targets')"/>

<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
<_SdkLanguageTargets>$(MSBuildExtensionsPath)\Xamarin\$(_SdkTargetPlatformName)\Xamarin.$(_SdkTargetPlatformName).$(_SdkTargetsImportType).targets</_SdkLanguageTargets>
</PropertyGroup>

<PropertyGroup>
<_SdkLanguageTargetsMissing Condition="!Exists('$(_SdkLanguageTargets)')">true</_SdkLanguageTargetsMissing>
</PropertyGroup>

<Import Project="$(_SdkLanguageTargets)" Condition="Exists('$(_SdkLanguageTargets)')"/>
<!-- Multi-valued properties only get checked by direct use in an Import -->
<Import Project="$(MSBuildExtensionsPath)\Xamarin\$(_SdkTargetPlatformName)\Xamarin.$(_SdkTargetPlatformName).$(_SdkTargetsImportType).targets"
Condition="Exists('$(MSBuildExtensionsPath)\Xamarin\$(_SdkTargetPlatformName)\Xamarin.$(_SdkTargetPlatformName).$(_SdkTargetsImportType).targets')"/>
<Import Project="$(MSBuildThisFileDirectory)CheckMissing.targets" />

<!-- CSharp is the only language supported for Binding Projects for Now -->
Expand Down

0 comments on commit 4d49dd2

Please sign in to comment.