I have a weird issue with a build designed for .NET 3.5. When you enable this assembly through Add Links / Browse in a DLL - it complains:
"MyAssembly.dll" or one of its dependencies requires a later version of the .NET Framework than those specified in the project. You can change the target of the .NET Framework by clicking Properties on the Project menu, and then selecting a new target from the .NET Framework drop-down list. (In Visual BVasic, this is located on the Compilation tab by clicking on the "Advanced Compiler Options ..." button.) Do you still want to add a link to "MyAssembly.dll" in the project?
There seems to be no rhyme or reason for this error - we tried the โobviousโ things.
The assembly consuming the DLL is .NET 3.5. DLLs are .NET 3.5. All the builds that everyone uses are .NET 3.5. Nothing uses .NET 4.0 [AFAIK]
What can I check / do? There are several COM interactions in the DLL - could it be? This project was moved from VS 08 to VS 10, but again, it still targets .NET 3.5. I confirmed that all assemblies listed in the Reference section indicate the correct version of the CLR [2].
Upgrading the target project to .NET 4 fixes the problem - but that's not what we can do at this time.
- It should also be noted that including it through a link / project [the same solution] seems to work - when lowering the DLL to .NET 3.0. [this may not be entirely accurate - many things have been verified]
I have no ideas at the moment.
source share