[C# 4.6 on VS 2017]
We are currently migrating our Csproj from the old format to the new format (obviously), and we are facing a weird issue.
One project is using the Microsoft.Office.Interop.Excel assembly. At some point we manipulate Excel Range attributes like this:
public static void ApplyGradient(Range rng)
{
rng.FormatConditions[1].ColorScaleCriteria[1].FormatColor.TintAndShade = 0;
}
When browsing to the assembly from VS, we observe different Microsoft.Office.Interop.Excel signatures in old and new projects. Here is what we see:
- Microsoft...Excel seen in old solution => attributes are
dynamic
- Microsoft...Excel seen in new solution => attributes are
object
The result is a compilation issue, in the new version of csproj, because ColorScaleCriteria
is not understood as a property of object
obviously.
We have tried several actions, like adding the System.Dynamic.Runtime
dependency in our project, but it did not solve anything.
Any help would be greatly appreciated. Many thanks!