I installed the latest version. I choose to extract the Flexcell.dll file for .NET Framework 4.0. I updated that file in my Bin directory. When I try to compile the project, I have:
The primary reference "FlexCel, Version=6.7.12.0, Culture=neutral, PublicKeyToken=cb8f6080e6d5a4d6, processorArchitecture=MSIL" could not be resolved because it was built against the ".NETFramework,Version=v4.6" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
So, the project cannot compile.
I would have expected that if I would have tried to compile the project with FlexCel.dll from the D:\TMSSoftware\FlexCelNET\lib\net46 directory. But, I really took it from D:\TMSSoftware\FlexCelNET\lib\net40.
I tried that several times and it just does not work.
My project is set to compile, as indicated above, for .NET Framework 4.0.
I cannot compile for .NET Framework 4.6 as I still have environment using Windows Server 2003 and that max out at .NET Framework 4.0.
Are you still the file in D:\TMSSoftware\FlexCelNET\lib\net40 was really a file built for .NET Framework 4.0? If yes, why can't I use it?
Hi,
[Reflection.Assembly]::ReflectionOnlyLoadFrom("D:\TMSSoftware\FlexCelNET\lib\net40\FlexCel.dll").ImageRuntimeVersion
I checked in Powershell and it is exactly as you mentioned.
When I referenced directly your file in the TMS directory, it worked.
But, I need to preserve all Bin files into the framework Bin folder. When that file is there, it now compiles. So, I assume the temporary change to link directly to your folder reset something.
However, I have a warning:
Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.
In order to avoid that, I have to add this in the configuration file:
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
I did not have to do that before.
I am also not sure if I would like to have that setting as I do not know the impact.
Do you know why I am forced to add that setting now to avoid the conflict?
Ok, this was related to a bug in Visual Studio.
If the framework project updates a reference of a library, if the child project is opened, it will give this. We have to close the child project and re open it and there is no more warning.