I have a solution that has a class library that references some third party .Net assemblies. Those third party assemblies have dependencies on non-.Net assemblies. The non-.Net assemblies do not copy to the bin folder, which results in an error "Could not load xxx assembly or one of its dependencies". So I created a pre-build event to copy them to the bin folder and this solved the problem.
Then when I referenced my project from a console project in the same solution, I got the same error so I did the same thing with a pre-build event in the console project. Again, that solved the problem.
Now, when I reference the class library project from an MVC application in the same solution I get the same error. But using the same pre-build event that worked in the other two situations does not solve the problem for the web app. I've tried using both the development server and IIS, but get the same error. I've also tried adding a handler to AssemblyResolve in the Application_Start() in the Global.asax to see what is going on, but it doesn't fire.
Do I need to put the files somewhere other than the bin directory for a web app?
Win 7, IIS 7, VS 2010, .Net 4, MVC 3