1

I have looked at the other answers to similar error mgs, but none of the answers seem to work. I am trying to debug an asp.net mvc 3 application using vs 2010 on a windows xp machine. This application was working fine, yesterday I was jumping between two applications , copying code etc. Then today I get the below error when trying to run (it builds no problem) The only difference was when I opened the application in Visual studio today, a window appeared before program loaded stating the following...

URL http://localhost:1697/.

The Web project "MyProject" is currently configured to use the (url from above line goes here)The Web server has this URL mapped to a different folder "C:\Projects\MyotherProject". Would you like to remap this URL to this Web projects folder ?

..........I assumed I hit yes...and I got the error below Server error in'/' application

  Could not load file or assembly 'DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246' or one of its dependencies. The system cannot find the file specified.

I have tried, clearing out the bin and obj folders and then cleaning and re-building. I don't understand where/what the problem is ? can anyone advise ?

mkell
  • 711
  • 2
  • 13
  • 31
  • Can you look at the modifications done between today and the last time you observed that this project was working as expected ? (from SVN or TFS per example) – cubitouch Jan 21 '14 at 14:33
  • You can diagnose assembly load issues with [fusion log viewer](http://msdn.microsoft.com/en-us/library/e74a18c4.aspx) – Lee Jan 21 '14 at 14:37
  • I'm afraid not there is no version control in place (yet), the code I'm running, had no changes made, only copied code from it. I'm thinking it's something to do with an assembly being cached between the applications ? As I noticed earlier , I was making changes to the code and the they were not being displayed when running. – mkell Jan 21 '14 at 14:37
  • Why would it look for DotNetOpenAuth.Core, if it's not in the reference folder ? where would it be called from ? – mkell Jan 21 '14 at 14:55
  • May http://stackoverflow.com/questions/13942653/could-not-load-file-or-assembly-dotnetopenauth-core can help you fix your error. – brothers28 Jan 21 '14 at 15:05

1 Answers1

0

That usually means you are missing a reference in your project to the mentioned assembly, or a version conflict, at which point:

  • A web.config entry could trigger that exception
  • Some of the code you copied may be dependent on said assembly/version
  • Default scaffolding in VS, does include sample/working authentication code (e.g. DotNetOpenAuth.Core - you'll usually find this in the Accounts folder (web site, web app, etc.)

Some other items to check

  • you mentioned Win XP, does this box have version parity (at least .Net/ASP.Net) installed with the dev box that the project was (originally) created?
  • you could use Web Platform Installer to figure this out and then load the needed assemblies at the same time
  • is there a package.config file in the project? That could help too - just so you know your dependencies (then make sure you have them in the debugging box).
EdSF
  • 11,753
  • 6
  • 42
  • 83
  • No sign of a ref in web.config, this code did not contain any ref to DotNetOpenAuth.core , just checked with crtl "f", No sign of it in package.config either. As I said I was jumping between applications, one was the mvc4 template, would the application somehow be looking at the wrong config file ? (I have cleared the cache on the browser) – mkell Jan 21 '14 at 15:17
  • @mkell How about any *startup code* - i.e. global.asax, \_appstart, etc.? It may not call the assembly name (ctrl f) so it could be some _method_ dependent on it. It's trying to load the assembly for *some* reason... – EdSF Jan 21 '14 at 16:15
  • @mkell may sound stupid, but..in the `\bin` folder - is the `DotNetOpenAuth.Core.dll` file there? – EdSF Jan 21 '14 at 16:24
  • nope, nothing in global, _appstart or \bin (I hope I'm being clear it wasn't in the original code in the first place so I'm trying to find way it's being called from)..thanks for your efforts though – mkell Jan 21 '14 at 17:02
  • I actually ended up copying the file and opening directly from the C drive and it works....very odd, as I've being opening from the desktop for weeks now, thanks for all the suggestions. – mkell Jan 22 '14 at 09:12