Exception when using RouteTable.Routes.MapMvcAttributeRoutes() in CMS with EpiserverForms v4.24.3

Found in

EPiServer.Forms 4.24.3

Fixed in

EPiServer.Forms 4.25.0

Created

May 10, 2019

Updated

Jun 24, 2019

State

Closed, Fixed and tested


Description

Attempt to use RouteTable.Routes.MapMvcAttributeRoutes() while having the latest version of Episerver Forms installed throws an exception.

Steps to reproduce:
1. Download the Alloy Demo Kit from github.
2. Upgrade all Nuget packages to the latest supported version.
3. In Startup.cs, add the following line: RouteTable.Routes.MapMvcAttributeRoutes();
4. Run the solution.

Expected:
The site starts and displays the start page.

Actual:
The site displays a YSOD with the following exception message:

Cannot call action method 'Void GetFormExternalResources(System.Collections.Generic.List`1[System.String] ByRef, System.Collections.Generic.List`1[System.String] ByRef)' on controller 'EPiServer.Forms.Controllers.FormContainerBlockController' because the parameter 'System.Collections.Generic.List`1[System.String]& scripts' is passed by reference.
Parameter name: methodInfo