开发者

Error compiling MVC 3 project after adding FacebookWebMvc Nuget Package

I added the FacebookWebMvc Nuget package to my MVC 3 Web Application project and then created the following controller:

public ActionResult FacebookLogOn(string returnUrl)
{
    if (!FacebookWebContext.Current.IsAuthenticated())
    {
        throw new Exception("Please log into facebook");
    }
}

When I try to compile, I get this error (with the FacebookWebContext highlighted as the source of the error):

The type 'Facebook.Web.FacebookWebContext' exists in both 'I:\sites\ICTOAD\packages\FacebookWeb.5.0.26.0\lib\net40\Facebook.Web.dll' and 'I:\sites\ICTOAD\packages\FacebookWeb.5.0.26.0\lib\net40\CodeContracts\Facebook.Web.Cont开发者_JAVA百科racts.dll'


Just remove a reference to Facebook.Web.Contracts.dll from your project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜