Skip to content

Commit

Permalink
Move to props
Browse files Browse the repository at this point in the history
  • Loading branch information
Oren Novotny committed Jul 29, 2018
1 parent 6ea905f commit d0e0fdd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
13 changes: 13 additions & 0 deletions Source/MSBuild.Sdk.Extras/Build/Core.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@
<SupportedCultures Condition="'$(SupportedCultures)' == ''">$(DefaultLanguage)</SupportedCultures>
</PropertyGroup>

<!--
Detect the SDK version. For now, we have to check the NETCoreSdkVersion
else check BundledNETCoreAppTargetFrameworkVersion property for Sdk <= 2.1.300
else Give 1.0 version since that property doesn't exist in 1.x Sdks
-->
<PropertyGroup>
<_NETCoreSdkVersion>$(NETCoreSdkVersion)</_NETCoreSdkVersion>
<!-- Handle SemVer version like 2.1.300-preview, since MSBuild doesn't compare versions with alpha-numeric chars! -->
<_NETCoreSdkVersion Condition="$(_NETCoreSdkVersion.Contains('-'))">$(_NETCoreSdkVersion.Split('-')[0])</_NETCoreSdkVersion>
<_NETCoreSdkVersion Condition="'$(_NETCoreSdkVersion)' == ''">$(BundledNETCoreAppTargetFrameworkVersion)</_NETCoreSdkVersion>
<_NETCoreSdkVersion Condition="'$(_NETCoreSdkVersion)' == ''">1.0</_NETCoreSdkVersion>
</PropertyGroup>

<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == '' OR '$(VisualStudioVersion)' &lt; '14.0'">15.0</VisualStudioVersion>
</PropertyGroup>
Expand Down
14 changes: 0 additions & 14 deletions Source/MSBuild.Sdk.Extras/Build/Core.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,4 @@
<Import Project="$(MSBuildThisFileDirectory)..\DefaultItems\DefaultItems.targets"/>
<Import Project="$(MSBuildThisFileDirectory)..\ProjectSystem\ProjectSystem.targets"/>

<!--
Detect the SDK version. For now, we have to check the NETCoreSdkVersion
else check BundledNETCoreAppTargetFrameworkVersion property for Sdk <= 2.1.300
else Give 1.0 version since that property doesn't exist in 1.x Sdks
-->
<PropertyGroup>
<_NETCoreSdkVersion>$(NETCoreSdkVersion)</_NETCoreSdkVersion>
<!-- Handle SemVer version like 2.1.300-preview, since MSBuild doesn't compare versions with alpha-numeric chars! -->
<_NETCoreSdkVersion Condition="$(_NETCoreSdkVersion.Contains('-'))">$(_NETCoreSdkVersion.Split('-')[0])</_NETCoreSdkVersion>
<_NETCoreSdkVersion Condition="'$(_NETCoreSdkVersion)' == ''">$(BundledNETCoreAppTargetFrameworkVersion)</_NETCoreSdkVersion>
<_NETCoreSdkVersion Condition="'$(_NETCoreSdkVersion)' == ''">1.0</_NETCoreSdkVersion>
</PropertyGroup>


</Project>

0 comments on commit d0e0fdd

Please sign in to comment.