ASP.NET MVC 2 build source issue

Hello guys I would like to share here my experience with error about running the ASP.NET MVC source. I run in trouble when I was trying to build the MVC 2 RTM source code with .NET 4. The compilation pass well but when I try to run an MVC Site and  I  was getting the following crazy exception:

Inheritance security rules violated while overriding member: ‘System.Web.Mvc.TempDataDictionary.System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)’. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

What is the solution ? 🙂 Yes the solution is (if you want  not to change the source code of the MVC ) just build the assembly with 3.5 .NET Version and then fill free to reference it in  ASP.MVC WebSite running under 4.0 .NET

Hope this will help someone that run in the same trouble like me 🙂

Regards,

Rado

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s