2

My MVC 3 project is building successfully in my development machine with Visual Studio 2010 + MVC 3.

Last night I deployed a routine update to the live server for my MVC website. It was working fine on dev, but on deployment the entire site fell over with a "system.web.mvc" could not be found.

After a bit of research I tried setting my reference to system.web.mvc.dll to "Copy Local". On deployment, this partially solved the problem, but now I get the following error on accessing the site:

BC30451: 'ViewData' is not declared

The ViewData is the first code reference on the page, so it would seem that system.web.mvc is somehow not accessible from the vbhtml file, despite having "fixed" the first error.

Struggling to find any reference to this problem on line, so any assistance much appreciated.

tereško
  • 58,060
  • 25
  • 98
  • 150
MJStanford
  • 21
  • 3

1 Answers1

0

You should use special mechanism for bin deployment of MVC 3. Just right click on the project and select Add Deployable Assemblies and you’ll see the following dialog.

Check first and click ok.

For more information you can read this link

Kirill Bestemyanov
  • 11,946
  • 2
  • 24
  • 38