Skip to content

Fix Microsoft.IO.Redist versions #48819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<PackageVersion Include="Microsoft.Extensions.ObjectPool" Version="$(MicrosoftExtensionsObjectPoolPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Ini" Version="$(MicrosoftExtensionsConfigurationIniVersion)" />
<PackageVersion Include="Microsoft.FSharp.Compiler" Version="$(MicrosoftFSharpCompilerPackageVersion)" />
<PackageVersion Include="Microsoft.IO.Redist" Version="$(MicrosoftIORedistPackageVersion)" />
<PackageVersion Include="Microsoft.Net.Compilers.Toolset.Framework" Version="$(MicrosoftNetCompilersToolsetFrameworkPackageVersion)" />
<PackageVersion Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
<PackageVersion Include="Microsoft.NET.HostModel" Version="$(MicrosoftNETHostModelVersion)" />
Expand Down Expand Up @@ -132,7 +133,7 @@

Note: This is not abstracted in Versions.props because source-only
modes will import a version override file after Versions.props. -->
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' == 'true' or '$(TargetFramework)' != 'net472'">
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' == 'true' or '$(TargetFramework)' != 'net472' or '$(IsTestProject)' == 'true'">
<!-- MSBuild-y stuff that runs in the CLI can always reference the latest MSBuild since
that is what will be packaged with the .NET SDK. -->
<PackageVersion Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" />
Expand All @@ -145,7 +146,7 @@
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildVersion)" />
<PackageVersion Include="Microsoft.NET.StringTools" Version="$(MicrosoftBuildVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(TargetFramework)' == 'net472'">
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(TargetFramework)' == 'net472' and '$(IsTestProject)' != 'true'">
<!-- MSBuild-y stuff that runs in VS/MSBuild.exe should reference the lagging minimum version so
it works in that slightly-older Visual Studio. -->
<PackageVersion Include="Microsoft.Build" Version="$(MicrosoftBuildMinimumVersion)" />
Expand Down
3 changes: 2 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<SystemCommandLineVersion>2.0.0-beta5.25304.106</SystemCommandLineVersion>
<SystemCommandLineNamingConventionBinderVersion>2.0.0-beta5.25279.2</SystemCommandLineNamingConventionBinderVersion>
<MicrosoftCodeAnalysisAnalyzerTestingVersion>1.1.2-beta1.22216.1</MicrosoftCodeAnalysisAnalyzerTestingVersion>
<MicrosoftIORedistPackageVersion>6.1.3</MicrosoftIORedistPackageVersion>
<MicrosoftVisualBasicVersion>10.3.0</MicrosoftVisualBasicVersion>
<MicrosoftVisualStudioSetupConfigurationInteropVersion>3.2.2146</MicrosoftVisualStudioSetupConfigurationInteropVersion>
<MicrosoftWindowsCsWin32PackageVersion>0.3.49-beta</MicrosoftWindowsCsWin32PackageVersion>
Expand Down Expand Up @@ -199,7 +200,7 @@
Additionally, set the MinimumVSVersion for the installer UI that's required for targeting NetCurrent -->
<MicrosoftBuildVersion>17.15.0-preview-25304-106</MicrosoftBuildVersion>
<MicrosoftBuildLocalizationVersion>17.15.0-preview-25304-106</MicrosoftBuildLocalizationVersion>
<MicrosoftBuildMinimumVersion Condition="'$(DotNetBuildSourceOnly)' != 'true'">17.11.4</MicrosoftBuildMinimumVersion>
<MicrosoftBuildMinimumVersion Condition="'$(DotNetBuildSourceOnly)' != 'true'">17.13.9</MicrosoftBuildMinimumVersion>
<MinimumVSVersion>17.13</MinimumVSVersion>
</PropertyGroup>
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
</ItemDefinitionGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Framework" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Utilities.Core" IncludeAssets="Compile" />
<PackageReference Include="System.IO.Hashing" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Framework" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Utilities.Core" IncludeAssets="Compile" />
<!-- We carry NuGet as part of the package in case the package is used with an older SDKs or with full framework MSBuild. -->
<PackageReference Include="NuGet.Packaging" PrivateAssets="All" Publish="true" />
<!-- The ApiCompatibility/PackageValidation stuff depends on CodeAnalysis.CSharp at the version that is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Framework" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Utilities.Core" IncludeAssets="Compile" />
<ProjectReference Include="..\Microsoft.DotNet.GenAPI\Microsoft.DotNet.GenAPI.csproj" />
</ItemGroup>

Expand Down
7 changes: 7 additions & 0 deletions src/Layout/redist/redist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@
</ItemGroup>
</Target>

<Target Name="ValidateMinimumVersions" Condition="'$(DotNetBuildSourceOnly)' != 'true'" BeforeTargets="CoreCompile">
<PropertyGroup>
<_MSBuildMajorMinor>$([System.Version]::Parse('$(MicrosoftBuildMinimumVersion)').Major).$([System.Version]::Parse('$(MicrosoftBuildMinimumVersion)').Minor)</_MSBuildMajorMinor>
</PropertyGroup>
<Error Condition="'$(_MSBuildMajorMinor)' != '$(MinimumVSVersion)'" Text="The major and minor versions of MicrosoftBuildMinimumVersion ($(_MSBuildMajorMinor)) must match MinimumVSVersion ($(MinimumVSVersion))." />
</Target>

<Target Name="ReturnProductVersion" Returns="$(FullNugetVersion)" />

</Project>
4 changes: 2 additions & 2 deletions src/RazorSdk/Tasks/Microsoft.NET.Sdk.Razor.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Framework" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Utilities.Core" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Framework" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Utilities.Core" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" />
<PackageReference Include="Microsoft.Css.Parser" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
</ItemDefinitionGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Framework" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Utilities.Core" IncludeAssets="Compile" />
<PackageReference Include="NETStandard.Library.NETFramework" ExcludeAssets="All" NoWarn="NU1701" />
<!-- Lift dependency of NETStandard.Library.NETFramework to version produced in SBRP. -->
<PackageReference Include="NETStandard.Library" VersionOverride="$(NETStandardLibraryVersion)" ExcludeAssets="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
</ItemDefinitionGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Framework" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Utilities.Core" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" />
<PackageReference Include="Microsoft.NET.HostModel" />
<PackageReference Include="NuGet.ProjectModel" />
Expand Down
6 changes: 3 additions & 3 deletions src/Tasks/sdk-tasks/sdk-tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build" />
<PackageReference Include="Microsoft.Build.Tasks.Core" />
<PackageReference Include="Microsoft.Build.Utilities.Core" />
<PackageReference Include="Microsoft.Build" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Tasks.Core" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Utilities.Core" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Deployment.DotNet.Releases" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NuGet.Packaging" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Framework" IncludeAssets="Compile" />
<PackageReference Include="Microsoft.Build.Utilities.Core" IncludeAssets="Compile" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" />
<PackageReference Include="Microsoft.Web.Xdt" />
</ItemGroup>
Expand Down
Loading