0
votes

I have created a WCF REST web service using WCF REST SERVICE TEMPLATE. I am trying to deploy it using Visual studio 2010 Publish menu. It creates Virual directory in IIS but when I try to browse it, It gives error:

Compiler Error Message: CS0234: The type or namespace name 'MVC' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

Source Error:

Line 63:         <add namespace="System.Web.Mvc.Ajax" />
**Line 64:         <add namespace="System.Web.Mvc.Html" />**
Line 65:         <add namespace="System.Web.Optimization" />
Line 66:         <add namespace="System.Web.Routing" />
Line 67:         <add namespace="System.Web.WebPages" />

on line 64 that MVC is missing. I added reference using NUGET and now it says

Compiler Error Message: CS0234: The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

I have Visual studio 2012 installed on my system. Is it because IIS is looking for asp.net 4.5 where as application pool is asp.net 4.0 ?

Please suggest

http://visualstudiogallery.msdn.microsoft.com/fbc7e5c1-a0d2-41bd-9d7b-e54c845394cd

1

1 Answers

0
votes

Have you added Microsoft.AspNet.Web.Optimization -Version 1.0.0 via Package Manager?