Well , the problem I’ve met was moving to a new computer.
All of a sudden my development project , that has been upgraded from MVC1 to MVC2 months ago , suddenly refused to work . My new computer never had the installation of MVC1. (You can check if the GAC is familiar with MVC1)
I’ve got message saying that I’ve got MVC1 references in my project :
The stack trace was :
So I started looking for MVC1. Well after a little wild I found this :
Through Red Gate’s .Net Reflector I opened a suspicious .dll in this mortal sin , and found out that the Mvc it references is MVC1. Also in their site it said :
Important: xVal is recommended for use only with ASP.NET MVC 1.0
If you’re using ASP.NET MVC 2.0 or later, the framework has built-in support for generating client-side validation logic directly from model metadata. You can still use xVal if you wish, but it won’t be actively developed or supported.
My solution was
to download latest version the source code from codeplex.com from http://xval.codeplex.com/SourceControl/list/changesets
Upgraded solution to VS2010 , removed MVC1 reference , added MVC2 reference , recompiled xVal.dll and all the projects using xVal.dll such as in my case xVal.RulesProviders.CastleValidator.dll and xVal.RulesProviders.NHibernateValidator.dll .
In my solution removed the old dll’s and added the new ones. For the double check opened with Reflector to see the MVC reference :
As you can see also the xVal and the derivatives are familiar with MVC2 only now.
The same story was with MVCContrib.dll :
For it I’ve just downloaded the new binaries from http://mvccontrib.codeplex.com/releases – the MVCContrib.release.zip .
From there on worked like a charm.