Reputation: 13436
Recently when I build and publish my MVC4 project a strange file appear in my bin folder and I encounter the following error while browsing the website:
Could not load file or assembly '`' or on of the its dependencies. An attempt was made to load a program with an incorrect format.
The website works well on the local IIS with the existence of these files.
When I delete these two files on either local or production server, it says:
Could not load type "XXXX.MvcApplication"
What can cause this?
Upvotes: 4
Views: 334
Reputation: 788
Go to your project properties(Right click on project and hit properties) and in Application tab change your Assembly name from "`" to the on you expected your dll name should be.
Upvotes: 2