// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Workaround to make Roslyn work on Dev15. Deploys System.ValueTuple 4.0.3.0 and binding redirects to override System.ValueTuple 4.0.1.0 in PrivateAssemblies.
Roslyn binaries are compiled against net472 and netstandard2.0. They reference ValueTuple types from mscorlib.dll and netstandard.dll, respectively.
netstandard.dll forwards to System.ValueTuple.dll 4.0.0.0, which in turn forwards to an implementation in mscorlib.dll.
System.ValueTuple.dll 4.0.1.0, which ships in PrivateAssemblies, also has an implementation of ValueTuple types (it does not forward to mscorlib.dll).
We need to prevent this assembly from loading since that would result in two different ValueTuple types loaded by different Roslyn components.
The binding redirects are specified manually since ProvideDependencyBindingRedirection attribute doesn't generate the right version for some reason.
Using System.ValueTuple.dll from Framework directory does not work since we'd need a downgrading redirect 0.0.0.0-4.0.1.0 -> 4.0.0.0, which VS doesn't apply
since it already has a redirect 0.0.0.0-4.0.1.0 -> 4.0.1.0.
TODO: Remove once we move to Dev16 (https://github.com/dotnet/roslyn/issues/29705)