Re: [mvc2inaction-discuss] error message about existing

5 views
Skip to first unread message
Message has been deleted
Message has been deleted

Jeremy Skinner

unread,
Nov 28, 2010, 6:35:39 AM11/28/10
to mvc2inacti...@googlegroups.com
Did you upgrade the example app to .NET 4 by any chance? The samples for the book are compiled against .NET 3.5 and come with separate System.Web.Abstractions / System.Web.Routing. 

If you've upgraded the samples to .NET 4 then they won't work out of the box as both various classes (eg RouteTable) were merged into System.Web as part of .NET 4, so essentially the app won't know which RouteTable class to use. 

You should have two options - either rollback the upgrade so that the sample runs on .NET 3.5 or you can manually modify the samples to remove references the net35 versions of System.Web.Routing/System.Web.Abstractions.

Jeremy

On 28 November 2010 11:02, Fullmetalboy <aki...@gmail.com> wrote:
Hi everybody!

I recieve error message from the sourcode in chapter 1 from the book
"ASP.NET MVC 2 in Action".

The error message is:

"Error 4 The type 'System.Web.Routing.RouteTable' exists in both 'C:
\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework
\v4.0\System.Web.dll' and 'C:\Documents and Settings\Vincent\Desktop
\3\Manning.ASP.NET.MVC.2.in.Action.Jun.2010\aspnetmvc2inaction_code\lib
\AspNetMvc\System.Web.Routing.dll'    C:\Documents and Settings\Vincent
\Desktop\3\Manning.ASP.NET.MVC.2.in.Action.Jun.
2010\aspnetmvc2inaction_code\src\Chapter01\GuestBook\Global.asax.cs"

and

"Error 1 The type 'System.Web.Routing.RequestContext' exists in both
'c:\Program Files\Reference Assemblies\Microsoft\Framework
\.NETFramework\v4.0\System.Web.dll' and 'c:\Documents and Settings
\Vincent\Desktop\3\Manning.ASP.NET.MVC.2.in.Action.Jun.
2010\aspnetmvc2inaction_code\lib\AspNetMvc\System.Web.Routing.dll'
C:\Documents and Settings\Vincent\Desktop\3\Manning.ASP.NET.MVC.
2.in.Action.Jun.2010\aspnetmvc2inaction_code\src\Chapter01\GuestBook
\Controllers\AccountController.cs".

What should I do in order to make the program to be working properly?

// Fullmetalboy

--
--------------------
Please feel free to comment on the progress of the book, the content, and the code samples.  All code and text is available on the book's GitHub site at http://github.com/jeffreypalermo/mvc2inaction.  We hope developing this book out in the open and with your feedback makes it a great book for the community.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages