.NET 4.0

Apr 13, 2010 at 4:59 PM
Edited Apr 13, 2010 at 7:26 PM

Changes required to WebUtils.cs in order to get this to work under .NET 4.0

 return  (string) _getWebResourceUrlMethod.Invoke(null,
                                                                   new object[]
                                                                           Assembly.GetAssembly(typeof (T)), resourceName,
                                                                           false, false, null

Removed the root VirtualPath resolver and 2 extra params added to the method invocation. Wish there was a better way to send emebedded resources down to the client, this internal reflection stuff just smells to me.

May 6, 2010 at 9:34 PM

Thanks for pointing this out, I actually hadn't used this with ASP.NET 4.0 yet.

I fixed the issue and posted a newer version of the MvcMaps Preview 1 release for download.

Also, I know the reflection code using an Internal method within System.Web.dll looks/smells bad, but its the only way to access the resources without rewriting all the internal code that Microsoft wrote to do it. This is one of MANY things within the .NET Framework that I wish were not marked as Internal so we could use them more easily/safely.

Jul 3, 2010 at 2:07 PM
Edited Jul 4, 2010 at 4:06 AM

nevermind...working now.