Skip to content

Commit c39d144

Browse files
authored
Fix and simplify logic for setting the minimum VS version to display in the installer UI (#44412)
2 parents 11a9924 + 9b023c8 commit c39d144

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

eng/Versions.props

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,13 @@
193193
from the 'minimumMSBuildVersion' file in non-source-only cases into MicrosoftBuildMinimumVersion,
194194
then use that in Directory.Packages.props.
195195
196-
At usage sites, either we use MicrosoftBuildMinimumVersion, or MicrosoftBuildVersion in source-only modes. -->
196+
At usage sites, either we use MicrosoftBuildMinimumVersion, or MicrosoftBuildVersion in source-only modes.
197+
198+
Additionally, set the MinimumVSVersion for the installer UI that's required for targeting NetCurrent -->
197199
<MicrosoftBuildVersion>17.12.7</MicrosoftBuildVersion>
198200
<MicrosoftBuildLocalizationVersion>17.12.7-preview-24522-03</MicrosoftBuildLocalizationVersion>
199201
<MicrosoftBuildMinimumVersion Condition="'$(DotNetBuildSourceOnly)' != 'true'">17.11.4</MicrosoftBuildMinimumVersion>
202+
<MinimumVSVersion>17.12</MinimumVSVersion>
200203
</PropertyGroup>
201204
<PropertyGroup>
202205
<!-- Dependencies from https://github.com/dotnet/templating -->

src/Installer/redist-installer/targets/GenerateMSIs.targets

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -285,24 +285,6 @@
285285
Overwrite="true" />
286286
</Target>
287287

288-
<Target Name="GetMinimumVSVersion"
289-
BeforeTargets="GenerateSdkBundle"
290-
Condition=" '$(OS)' == 'Windows_NT' "
291-
Outputs="$(MinimumVSVersion)">
292-
<PropertyGroup>
293-
<MinimumMSBuildVersionFile Condition="$([System.Text.RegularExpressions.Regex]::Match(%(SDKInternalFiles.Identity),'.*minimumMSBuildVersion').Success) ">%(SDKInternalFiles.Identity)</MinimumMSBuildVersionFile>
294-
</PropertyGroup>
295-
296-
<ReadLinesFromFile File="$(MinimumMSBuildVersionFile)">
297-
<Output TaskParameter="Lines" PropertyName="MinimumVSVersion" />
298-
</ReadLinesFromFile>
299-
300-
<PropertyGroup Condition=" '$(VersionSDKMinor)' == '1' and '$(StabilizePackageVersion)' == 'true' ">
301-
<MinimumVSVersion>$(MinimumVSVersion.Substring(0,$(MinimumVSVersion.LastIndexOf('.'))))</MinimumVSVersion>
302-
<MinimumVSVersion >$([MSBuild]::Add($(MinimumVSVersion), .1))</MinimumVSVersion>
303-
</PropertyGroup>
304-
</Target>
305-
306288
<Target Name="GenerateSdkBundle"
307289
DependsOnTargets="GenerateLayout;AcquireWix;MsiTargetsSetupInputOutputs;GenerateSdkMsi;GenerateTemplatesMsis;GenerateWorkloadManifestsWxs"
308290
Condition=" '$(OS)' == 'Windows_NT' "

0 commit comments

Comments
 (0)