Reputation: 1172
I recently changed the output path of some of the projects in our MVC website solution to standardize them. For instance the main projects changed from bin\
to bin\x64\Debug\
for the Debug configuration. I changed this via the GUI access by right clicking on the project and selecting properties.
I can rebuild all with no error, but when I start the web app I get:
Could not load file or assembly 'System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
...
=== Pre-bind state information ===
LOG: DisplayName = System.Web.Mvc, Version=4.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/bookshelf/Bookshelf/
LOG: Initial PrivatePath = C:\bookshelf\Bookshelf\bin
Calling assembly : (Unknown).
===
It looks as if asp.net / IIS are still looking in the bin folder perhaps? I have already tried deleting all temp files in user/appdata/local, rebuild all on the solution, and restarting visual studio. I have also tried deleting everything from the .vs folder for the solution, and deleting the csproj.user file for the project.
The dlls are in the bin/x64/Debug folder on the filesystem, as expected from the output path setting.
Upvotes: 0
Views: 667
Reputation: 1038930
It looks as if asp.net / IIS are still looking in the bin folder perhaps?
Of course, that's the location where ASP.NET is looking for assemblies. So make sure that they are located in this folder if you want your web application to work. You cannot possibly expect ASP.NET to be looking in some non standard locations such as bin\x64\Debug
for example. If you need it to look in some custom locations for assemblies you might need to write a custom assembly loader.
Upvotes: 1