buunguyen / combres

ASP.NET and MVC performance optimization library ⛺
Other
123 stars 37 forks source link

After updated to last version error in RouteTable.Routes.AddCombresRoute("Combres"); #3

Closed romias closed 11 years ago

romias commented 11 years ago

The error itself is below. Besides running the nuget update, Is there any thing to change? It seems that something Combres is looking for using FasterFlect is not there anymore...


Method not found: 'System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type)'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MissingMethodException: Method not found: 'System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type)'.

Source Error:

Line 6: public static class Combres { Line 7: public static void PreStart() { Line 8: RouteTable.Routes.AddCombresRoute("Combres"); Line 9: } Line 10: }

[MissingMethodException: Method not found: 'System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type)'.] Fasterflect.Emitter.CtorInvocationEmitter.CreateDelegate() +0 Fasterflect.Emitter.BaseEmitter.GetDelegate() +251 Combres.NoArgCtorCreator.Create(Type loggerType, String name) +98 Combres.Configuration..cctor() +58

[TypeInitializationException: The type initializer for 'Combres.Configuration' threw an exception.] Combres.Configuration.GetCombresUrl() +24 Combres.WebExtensions.AddCombresRoute(RouteCollection routes, String name) +400 Babieca.App_Start.Combres.PreStart() in C:\Users\IngMatiasGamarra\Desktop\BABIECA\Babieca\App_Start\Combres.cs:8

buunguyen commented 11 years ago

Which .NET framework you are using?

romias commented 11 years ago

I'm using .NET 4.0.

None of your previous tips worked:

- Remove logProvider in the combres element of web.config
- Install-Package combres.log4net

What additional information do you need?

drlobo commented 11 years ago

I had the same issue, it's due to the Fasterflect library compiled with .net 4.5 to target .net 4.0. If you are in the same situation as me (.net 4.5 not installed on your pc), get the source code of Fasterflect, compile it and replace your fasterflect dll with the new one.

buunguyen commented 11 years ago

I just pushed a release that references Fasterflect 2.1.0 (a version that wasn't built with .NET 4.5). Please try to see if that fixes this issue. Make sure you remove all assembly redirection to the latest version of Fasterflect.