Lack of 'DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246' in MVC 4 project
Asked Answered
O

3

5

I have downloaded project which is the effect of Pluralsight MVC 4 free tutorial videos available at Microsoft's site: http://www.asp.net/mvc/videos/pluralsight-building-applications-with-aspnet-mvc-4

Link to project: http://www.speedyshare.com/GGTrM/odetofoodmvc4-7c20f071ef3b.zip

I've already create MVC Music Store app and it works fine. Altough this project, which obviously suppose to be correct, after running from Visual Studio 2013 I gives this message:

System.IO.FileNotFoundException: Cannot load file 'DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246' 

Stack:

[FileNotFoundException: Nie można załadować pliku lub zestawu 'DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246' lub jednej z jego zależności. Nie można odnaleźć określonego pliku.]
   Microsoft.Web.WebPages.OAuth.PreApplicationStartCode.Start() +0

[InvalidOperationException: Metoda Start w typie Microsoft.Web.WebPages.OAuth.PreApplicationStartCode, wywoływana na etapie inicjalizacji przed uruchomieniem aplikacji, zgłosiła wyjątek; komunikat o błędzie: Nie można załadować pliku lub zestawu 'DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246' lub jednej z jego zależności. Nie można odnaleźć określonego pliku..]
   System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +556
   System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +132
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +102
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +153
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +516

[HttpException (0x80004005): Metoda Start w typie Microsoft.Web.WebPages.OAuth.PreApplicationStartCode, wywoływana na etapie inicjalizacji przed uruchomieniem aplikacji, zgłosiła wyjątek; komunikat o błędzie: Nie można załadować pliku lub zestawu 'DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246' lub jednej z jego zależności. Nie można odnaleźć określonego pliku..]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9885060
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Question: Does my system lack any tools to run this application? If yes, how to install DotNetOpeanAuthCore in this version.

Overwind answered 29/6, 2014 at 0:6 Comment(1)
Do a nuget package restore if there is a package.config file, else just install the DotNetOpenAuth.Core dependency from NuGet package manager from inside of Visual Studio (go to Tools > NuGet Package Manager > Manage Packages for Solution > Search DotNetOpenAuth.Core)Edelweiss
L
4

In this specific case, simply go to Tools - NuGet Package Manager - Manage Packages for Solution and look AT THE TOP of the windows and there will be a button "Some NuGet packages are missing from this solution. Click to restore from your online package source" It's literally at the very top of the dialog. Click the Restore button and you are back in business. Rebuild your solution and the items that listed in error under /References should now be showing up ok.

If this happens in other scenarios, check your packages.config file to see what version is listed. If it is listed there restore the same version either via the gui or you can use the cmd line (I always use cmd line for nuget)

You can always just go to Tools -> NuGet Package Manager -> Package Manager Console And in the console window type

Install-Package DotNetOpenAuth.Core -Version 4.3.4.13329

(Replace with whatever version you need - thats the latest as of this writing but your project may use an earlier one) Again, thats for other scenarios - just extra info here. For this project you can just restore the packages like I mentioned in the beginning.

Liquidity answered 29/6, 2014 at 9:56 Comment(1)
Comment of adaam to orignal post solved the problem, but thank you for describing everything precisly. It will help other in the future and this is how it should be explained.Overwind
Q
3

I got the same error. Then I deleted bin and obj folders and reinstalled in Nuget console:

PS console

Install-Package Microsoft.Net.Http
Install-Package Microsoft.AspNet.WebPages.OAuth
VS 2013 Web express, MVC 4, project .NET 4.5.1
Quadrivalent answered 10/10, 2014 at 7:56 Comment(0)
O
1

You have to install following Nuget

  1. DotNetOpenAuth.Core
  2. DotNetOpenAuth.OAuth.Core
  3. DotNetOpenAuth.AspNet
  4. DotNetOpenAuth.OAuth.Consumer
  5. DotNetOpenAuth.OpenId

To install Nuget package, Right Click on Project Name in solution explorer -> Manage NuGet Package


enter image description here

Operate answered 3/3, 2016 at 15:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.