Cannot run my first program from http://facebooksdk.net/docs/windows/tutorial/ - FacebookSessionClient raising exception

0

I'm getting

Could not load file or assembly 'Facebook, Version=6.0.10.0, Culture=neutral, PublicKeyToken=58cb4f2111d1e6de' or one of its dependencies. The assembly version has a public key token that does not match that of the request. (Exception from HRESULT: 0x80132001)

at line

facebookSessionClient = new FacebookSessionClient(myFacebookAppIdInString);

in App.xaml.cs

I was following tutorial at http://facebooksdk.net/docs/windows/tutorial/ I couldn't even run my first basic program.

My Complete Code at: http://dropbox.com/s/brh09szot8yd52x/Facebook_2.zip

How to solve this problem? I've tried re-installing facebook and facebook.client -pre packages.

c#
facebook
facebook-c#-sdk
facebook-apps
facebook-login
asked on Stack Overflow Jun 29, 2014 by Muhammad Rehan Qadri • edited Jun 29, 2014 by Muhammad Rehan Qadri

2 Answers

1

I've been having the same issue and was at a bit of loss and found your question when trying to find an answer. It might not have been the same issue but the reason turned out to be my project was compiling a dll called Facebook.dll which was overwriting the SDK. You need to rename the assembly, right click the project - properties and change the "Assembly name". I had already renamed the project but forgot to rename the assembly. Oh well lesson learned.

answered on Stack Overflow Jul 25, 2014 by Richard Brisley
0

I would recommend using Dependency Walker. http://www.dependencywalker.com/

Open up the .exe or .dll with it and it will list all of the .dll dependencies for your program. Any .dlls that are missing or in the wrong format will appear red or yellow.

If any appear red (or yellow), you will need to locate the .dlls and possible put them in the directory where you are executing your program or into a common place such as your Windows system folder. (Usually C:\Windows\System32)

Sometimes when this happens it can be resolved by installing packaged .dlls, such as the Visual C++ Redistributable Packages for Visual Studio 2013 . However, in your case it appears that your program require dlls for Windows RT, so there may be a package that you need to install or perhaps you are targeting a different platform than the one that you are running the program on.

answered on Stack Overflow Jun 29, 2014 by LVBen • edited Jun 29, 2014 by LVBen

User contributions licensed under CC BY-SA 3.0