The type or namespace name 'Routing' does not exist in the namespace 'System.Web'

7.2k Views Asked by At

Application is based on .NET 4.0 (Property window shows the same). I am trying to implement routing in ASP.NET Webforms. I added global.asax and trying to register routes. I tried adding below line to Glabal.asax

<%@ Import Namespace="System.Web.Routing" %>

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

I'm not missing an assembly reference. I added reference to system.web(4.0) and system.web.routing(4.0) as well. Its still not working.

I don't know what is wrong here. Any help is appreciated

1

There are 1 best solutions below

0
On

Simply add the reference from Assemblies:

enter image description here

As @Fred indicated, please see Which NuGet package contains System.Web.Routing?