I'm having an odd problem on my build server. I'm using the latest version of TeamCity on Windows Server 2008 R2. I used the web platform installer to install ASP.NET MVC on the build server but, my compilation is still failing with messages that it cannot find the System.Web.Mvc.dll
. I've verified that it is on the disk at the expected location:
(C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies)
Here is a selection of the messages:
Controllers\AccountController.cs(7, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Controllers\AccountController.cs(15, 35): error CS0246: The type or namespace name 'Controller' could not be found (are you missing a using directive or an assembly reference?)
Controllers\HomeController.cs(5, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Controllers\HomeController.cs(9, 32): error CS0246: The type or namespace name 'Controller' could not be found (are you missing a using directive or an assembly reference?)
Global.asax.cs(5, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Models\AccountModels.cs(8, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
So what am I missing?
The errors you seem to be inferring that it can't find the correct version of the MVC dll. Is it possible you've installed the MVC (original) or MVC2 instead of the MVC3 from the web platform onto the build server?
Edit:
Also the file should be in the GAC, (not sure the location on Win Server 2008 but guessing it's similar to Win 7.)
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.Mvc\ (then the .Net version folder, mine is v4.0_3.0.0.0)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With