I have been working on an empty SharePoint 2010 project in Visual Studio 2010 and everything works as it should until I try to call a certain external assembly - adding a reference to the assembly alone (in solution explorer) is not problematic, but trying to use the assembly in code causes
"Error: Could not load file or assembly ', Version=22.214.171.124, Culture=neutral, PublicKeyToken=...' or one of its dependencies. The system cannot find the file specified."
I have no idea why. Here's what I know:
- assembly with the same name, version, culture and public key token is installed in GAC;
- I have included the assembly in the project package (Package.package - advanced - Add assembly).
- It makes no difference whether or not I specify (in package) 'safe controls' - right now, I have 'Safe' checked, Namespace set to assembly namespace, type = *, Assembly name = empty, 'Safe against script' unchecked.
- The assembly platform target is 'Any CPU', .NET 3.5 - same as the SharePoint project.
- If I create a normal C# console app ('Any CPU' target), I can reference and use the same assembly normally - no error occurs.
Anybody ever had a problem like this?