Bug 16475 - Method not found: 'System.Web.Routing.RouteCollection.get_AppendTrailingSlash'
Summary: Method not found: 'System.Web.Routing.RouteCollection.get_AppendTrailingSlash'
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web ()
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-11-27 07:52 UTC by Anton Maisak
Modified: 2015-08-31 02:10 UTC (History)
14 users (show)

Tags: c# mono apache2 mvc5 get_AppendTrailingSlash
Is this bug a regression?: ---
Last known good build:

Server error (3.61 KB, text/plain)
2013-11-27 07:59 UTC, Anton Maisak

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Anton Maisak 2013-11-27 07:52:23 UTC
Mono 3.2.7 MVC5 C# 

Method not found: 'System.Web.Routing.RouteCollection.get_AppendTrailingSlash'.

Sorry for my English.!

Web application powered on c# mvc5 .net4.5 from visual studio 2012 .

Application deployed in: ubuntu server 13.10. mono version 3.2.7 (i build it from git) web server Apache/2.4.6 mod_mono 2.11 (from git)

Version Information: 3.2.7 (master/5b65cb8 Wed Nov 27 14:49:11 MSK 2013); ASP.NET Version: 4.0.30319.17020

The application is working. But when i try to go to the any form, the application fails with the following error ^

Application Exception System.MissingMethodException Method not found: 'System.Web.Routing.RouteCollection.get_AppendTrailingSlash'.

Description: HTTP 500.Error processing request.

Details: Non-web exception. Exception origin (name of application or object): System.Web.Mvc.
Comment 1 Anton Maisak 2013-11-27 07:59:54 UTC
Created attachment 5552 [details]
Server error
Comment 2 Anton Maisak 2013-11-27 08:21:48 UTC
I can include whole project if needed
Comment 3 Borat 2013-12-01 13:20:08 UTC
I have the same error. I've tried to copy all assemblies but it doesn't change anything. Is it related to XSP?
Comment 4 Anton Maisak 2013-12-04 06:13:20 UTC
Any hope to fix it????
Comment 5 Borat 2013-12-05 04:22:15 UTC
Anton I've been looking this up and it is pretty clear that newest Mono does not have this function "System.Web.Routing.RouteCollection.get_AppendTrailingSlash". It means you can't do anything to fix it.
Comment 6 Andres G. Aragoneses 2014-01-14 11:38:12 UTC
> It means you can't do anything to fix it.

That is not true. Any bug is fixable. You just need to find a testcase that works in MS.NET, add a unit test that covers it in mono code base, and add a fix in Mono class libraries that makes the test pass. After that, make a pull request, and you're done!

That being said, there is already a person who has already worked on this, so you don't need to do it. He has already proposed a pull request here: 


And in there is one of the commits in this pull request where he implements the property AppendTrailingSlash:


So, just subscribe to that pullrequest if you want to get notified about progress on the review process.
Comment 7 Anton Maisak 2014-02-20 09:40:57 UTC
So, pullrequest closed, and i guess chanhges doesn`t accepted... ((((
Comment 8 Andres G. Aragoneses 2014-02-20 10:07:14 UTC
If you read the full pull-request you'll find that the author of the patch closed it to split it in numerous splitted pull-requests to make it easier to review.
Comment 9 Borat 2014-02-20 10:38:10 UTC
Anton, I think that MVC5 support to Mono will come whenever MVC6 comes out.
Comment 10 Anton Maisak 2014-02-20 14:33:18 UTC
All Works!!!

Mono JIT compiler version 4.0.0 (master/5597172 Чт. февр. 20 13:41:22 MSK 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen

Comment 11 Borat 2014-02-20 17:39:49 UTC
I can't compile from github sources. Hopefully tomorrow will can.
Comment 12 Nan Shi 2014-02-23 07:13:58 UTC
Anton, how can I get code?, Just clone git://githube.com/mono/mono.git ?
Comment 13 Borat 2014-02-23 13:26:04 UTC
Nan Shi, you clone it, then prepare it, then compile it and then install it.

git clone git://github.com/mono/mono.git
sudo make install
Comment 14 Nan Shi 2014-02-24 00:23:47 UTC
Thanks Borat,
I have install from
git clone git://github.com/mono/mono.git, and it shows up:

Mono JIT compiler version 4.0.0 (master/06502ec Sun Feb 23 20:20:04 PST 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen

But bug is still there?
Comment 15 Borat 2014-02-24 11:49:56 UTC
Nan Shi, yes, strangely I have it as well. I don't think it's fixed.
Comment 16 Anton Maisak 2014-03-03 04:24:51 UTC
Version Information: 3.4.0 (master/250756b Вс. марта 2 20:27:30 MSK 2014); ASP.NET Version: 4.0.30319.17020

MVC5 WebApplication Works here an example http://lab.3dmarket.org/

Application Fails with EF6
Comment 17 Nan Shi 2014-03-05 01:07:24 UTC

Borat, I guess any current mono from github.com will do.

It works for me now, make sure Microsoft.Web.Infrastructure.dll has been removed from everywhere, bin, package.config, lots of web.config of your project.

good luck!
Comment 18 Arsen.Shnurkov 2015-03-10 06:30:16 UTC
I have this bug, Microsoft.Web.Infrastructure.dll is removed,

# mono -V 
Mono JIT compiler version 4.1.0 (branch-master/6397c8d Mon Mar  9 20:48:09 MSK 2015)
Comment 19 Stephen Shaw 2015-04-04 01:24:12 UTC
Since most of the code around this is open source now [0] someone just needs to get it into mono and working.

[0] https://github.com/Microsoft/referencesource/tree/master/System.Web/Routing
Comment 20 Stephen Shaw 2015-04-04 01:26:54 UTC
It looks like someone has actually done a bunch of the work for this. Hopefully it loads in the near future.

Comment 21 xameeramir 2015-05-31 15:05:37 UTC
**[Copy pasting this simple hack][1]:** Instead of using ASP.NET MVC helpers, We can use basic HTML syntax like this:

**For anchor like components:**

<!-- begin snippet: js hide: false -->

<!-- language: lang-html -->

    <a href="~/ControllerName/ActionName"> Test </a>

<!-- end snippet -->


**For form like components:**

<!-- begin snippet: js hide: false -->

<!-- language: lang-html -->

        <form action="~/ControllerName/ActionName">
        <input type="text" placeholder="Enter name"/>
        <input type="submit" value="Submit"/>

<!-- end snippet -->

Surely, it doesn't solve the bug but at least it can get ASP.NET MVC 5 project running on Mono.

Thanks to [@teovankot][2] for pointing this out.

  [1]: http://stackoverflow.com/questions/30497900/method-routecollection-get-appendtrailingslash-not-found-when-using-razor-url/30561228#30561228
  [2]: http://stackoverflow.com/users/1849444/teo-van-kot
Comment 22 Andres G. Aragoneses 2015-06-09 10:03:31 UTC
This has been fixed in mono master ( https://github.com/mono/mono/commit/58e0608c10c621b15fd9f396f8e46c567891b231 ), please mark the bug as RESOLVED->FIXED.
Comment 23 Shane van Wyk 2015-07-07 22:46:21 UTC
@Andres Any idea when this will be released?

I have Mono and it is still not in that release.

Its been committed up before the release so would have though it would appear in that build.
Comment 24 Andres G. Aragoneses 2015-07-08 10:12:05 UTC
Shane, AFAIK the 4.0.x releases are published from a 4-0 branch, not from master branch.

So my guess is that the first mono version that will include this will be 4.4 (stable) or some 4.3.x (preview).
Comment 25 Shane van Wyk 2015-08-30 18:15:56 UTC
I can see the Fix in Mono 4.2 Branch. Can someone please mark this as resolved.
Comment 26 Marius Ungureanu 2015-08-31 02:10:27 UTC
As per: https://github.com/mono/website/pull/140#issuecomment-136205099

Marking as fixed.