The type or namespace name 'routing' does not exist in the namespace 'system.web' visual studio

4.5k Views Asked by At

The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

I added web reference System.Web.Routing, but still it showing error.

enter image description here

2

There are 2 best solutions below

0
leskovar On

You need to have .NET 3.5 with SP1.

0
Chris On

From MSDN:

To simplify development of XML Web service client applications, Visual Studio provides Web references. Web references differ from traditional references and components; instead of referencing a component or a class library installed on the local computer, a Web reference provides access to a resource that is available using an Internet protocol such as SOAP or HTTP. In practice, a Web reference is a generated proxy class that locally represents the exposed functionality of an XML Web service.

A web reference isn't what you want - in simple terms, references allow you to call into DLLs, while web references are used to call web services.

Remove the 'web reference' you've made, and add a normal reference instead.