Skip to content

Commit

Permalink
Binding redirect ValueTuple
Browse files Browse the repository at this point in the history
Match the VS-side binding redirects that force the use of 4.0.0.0
in all cases. Stop carrying a copy, since it will now always be found in
the GAC as part of .NET 4.7.2+, required by VS.

https://devdiv.visualstudio.com/DevDiv/_git/VS?path=%2Fsrc%2Fappid%2Fcommon%2Fcorefx.config.ttinclude&version=GBmain&line=93&lineEnd=101&lineStartColumn=1&lineEndColumn=29&lineStyle=plain&_a=contents
  • Loading branch information
rainersigwald committed Aug 31, 2021
1 parent edeed7f commit e16b4a0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/MSBuild/MSBuild.csproj
Expand Up @@ -25,11 +25,17 @@

<UseVSHostingProcess>false</UseVSHostingProcess>
<ApplicationManifest>MSBuild.exe.manifest</ApplicationManifest>

<AppConfig>app.config</AppConfig>
<!-- Temporary solution for
https://github.com/Microsoft/msbuild/issues/834 Long term
two files should be generated from a single source. -->
<AppConfig Condition="'$(Platform)' == 'x64'">app.amd64.config</AppConfig>
<!-- Disable binding redirect generation: we want to be deliberate
about the redirects we expose plugins to, and we explicitly
redirect ValueTuple _down_ to match VS. -->
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>

<IsPackable>true</IsPackable>
<ContentTargetFolders>contentFiles</ContentTargetFolders>
<BuildOutputTargetFolder>contentFiles\any\</BuildOutputTargetFolder>
Expand Down
5 changes: 4 additions & 1 deletion src/MSBuild/app.amd64.config
Expand Up @@ -108,7 +108,10 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
<!-- It is unusual to redirect down, but in this case it's ok: 4.0.3.0 forwards
to 4.0.0.0 in the GAC, so this just removes the need to redistribute a file
and makes that resolution faster. -->
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.0.0" />
</dependentAssembly>

<!-- Redirects for components dropped by Visual Studio -->
Expand Down
5 changes: 4 additions & 1 deletion src/MSBuild/app.config
Expand Up @@ -98,7 +98,10 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
<!-- It is unusual to redirect down, but in this case it's ok: 4.0.3.0 forwards
to 4.0.0.0 in the GAC, so this just removes the need to redistribute a file
and makes that resolution faster. -->
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.0.0" />
</dependentAssembly>

<!-- Redirects for components dropped by Visual Studio -->
Expand Down
2 changes: 0 additions & 2 deletions src/Package/MSBuild.VSSetup/files.swr
Expand Up @@ -42,7 +42,6 @@ folder InstallDir:\MSBuild\Current\Bin
file source=$(X86BinPath)Microsoft.Bcl.AsyncInterfaces.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.Text.Encodings.Web.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.Threading.Tasks.Extensions.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.ValueTuple.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.Numerics.Vectors.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.Resources.Extensions.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
file source=$(X86BinPath)System.Runtime.CompilerServices.Unsafe.dll vs.file.ngenApplications="[installDir]\MSBuild\Current\Bin\MSBuild.exe" vs.file.ngenArchitecture=all vs.file.ngenPriority=1
Expand Down Expand Up @@ -187,7 +186,6 @@ folder InstallDir:\MSBuild\Current\Bin\amd64
file source=$(X86BinPath)Microsoft.Bcl.AsyncInterfaces.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Text.Encodings.Web.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Threading.Tasks.Extensions.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.ValueTuple.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Numerics.Vectors.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Resources.Extensions.dll vs.file.ngenArchitecture=all
file source=$(X86BinPath)System.Runtime.CompilerServices.Unsafe.dll vs.file.ngenArchitecture=all
Expand Down

0 comments on commit e16b4a0

Please sign in to comment.