Fabio Milheiro
Fabio Milheiro

Reputation: 8474

ASP.NET Where to find dll being referenced

I upgraded my MVC3 project to MVC4 without much trouble but the Web API (the reason why I did it) is not working because, apparently, there's something referencing NHibernate.

<Exception>
  <ExceptionType>System.IO.FileNotFoundException</ExceptionType>
  <Message>Could not load file or assembly 'NHibernate, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The system cannot find the file specified.</Message>
  <StackTrace>
     at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
     at System.Reflection.RuntimeAssembly.GetExportedTypes()
     at System.Web.Http.Dispatcher.DefaultHttpControllerTypeResolver.GetControllerTypes(IAssembliesResolver assembliesResolver)
     at System.Web.Http.WebHost.WebHostHttpControllerTypeResolver.GetControllerTypes(IAssembliesResolver assembliesResolver)
     at System.Web.Http.Dispatcher.HttpControllerTypeCache.InitializeCache()
     at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue()
     at System.Lazy`1.get_Value()
     at System.Web.Http.Dispatcher.DefaultHttpControllerSelector.InitializeControllerInfoCache()
     at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue()
     at System.Lazy`1.get_Value()
     at System.Web.Http.Dispatcher.DefaultHttpControllerSelector.SelectController(HttpRequestMessage request)
     at System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsyncInternal(HttpRequestMessage request, CancellationToken cancellationToken)
     at System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
  </StackTrace>
</Exception>

I removed the references to NHibernate because I tried adding FunnelWeb blog to my site but I ended up with two completely different practices in the same project and I didn't like that at all.

And I don't think it's a good idea to put the NHibernate library in place again because I would hiding something I should know about.

I have tried NDepend but in no way NHibernate was found.

Note that my project is compiling and running fine. Any ideas please?

Upvotes: 1

Views: 609

Answers (2)

ryudice
ryudice

Reputation: 37366

Have you tried erasing your bin directory?

Upvotes: 1

Fabio Milheiro
Fabio Milheiro

Reputation: 8474

The solution was the obvious one. There was a FunnelWeb crappy dll that was referencing NHibernate.

Upvotes: 0

Related Questions