Hi,
We've got an .exe that ran under SP2007 just fine. It's a console application that references a couple SP assemblies:
Microsoft.Sharepoint.dll
Microsoft.Sharepoint.Search.dll
Migrating it to SP2013, it throws the following exception:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint.Library, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
Why is the code suddenly looking for Microsoft.Sharepoint.Library.dll? Did some class or method get moved into that assembly in SP2013 (just grasping at straws)?
If I drop Microsoft.Sharepoint.Library.dll into the .exe directory, I then get the following exception:
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'Microsoft.SharePoint.Library, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
The box I got DLL from, as well as the box the code is running on, both have .NET 4.5 installed. So I don't get why this exception is cropping up. Any ideas?
The box the code is running on does have SP2013 installed.
TIA.