Not able find Compare attribute in ASP.NET MVC 3 RTM - asp.net-mvc

I am not able to find Compare attribute in ASP.NET MVC 3 RTM.
Is this because of me using the ASP.NET MVC 3 RTM? if yes then which version i have to use?

It's very possible, yes. It didn't exist in MVC 2, but MVC 3 has it (tested it). Try using the latest release of MVC 3 (thus, not the RTM).
If at that point you're still not able to find it, something else is wrong.

Related

asp.net mvc 2 to mvc 4

I would like to update my project from:
ASP.NET MVC 2 with Entity Framework 4.
to
ASP.NET MVC 4 and Entity Framework 4.1
How can this be done?
You may take a look at the ASP.NET MVC 4.0 release notes which explain how to upgrade from an ASP.NET MVC 3 application. And the release notes of ASP.NET MVC 3.0 explain how to upgrade from ASP.NET MVC 2.
As far as upgrading from EF 4.0 to EF 4.1, it's as simple as updating the assembly reference. Of course if you wanted to do Code First approach you will have to make more extensive modifications.
Instead of doing it manually which will indeed take a lot of effort....why not check out my answer to a similar question and use ASP.NET MVC 3 Application Upgrader to go from MVC2 -> MVC3 and UpgradeMvc3ToMvc4 to go from MVC3 -> MVC4.

Problem in opening ASP.NET mvc 1 projects in ASP.NET mvc 2

I cannot open a project built on ASP.NET MVC 1 in an MVC 2 environment. I get an exception saying 'The Project File xxxx.csproj cannot be opened. This project type is not supported by this installation'.
I can create a new MVC application though. I suspect this is due to the backward non compatibility of MVC 2 and 1, but am not sure. Please help.
You can open MVC1 projects but you need to delete a key from the project file:
http://weblogs.asp.net/leftslipper/archive/2009/01/20/opening-an-asp-net-mvc-project-without-having-asp-net-mvc-installed-the-project-type-is-not-supported-by-this-installation.aspx
You can also upgrade them with this tool:
http://weblogs.asp.net/leftslipper/archive/2009/10/19/migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx
hope this helps
Yes, MVC 2 is not seamlessly backward compatible.
You can have MVC 1 and MVC 2 installed side by side.
You can upgrade your MVC 1 project to MVC 2, see upgrading information.

How do I write an MVC 1 app with MVC 2?

I went to http://www.asp.net/mvc and the web installer offered me the option to install MVC 2, but not MVC 1.
I thought MVC 2 was still in beta? Either way, I need to write an MVC 1 app. In visual studio, my only choice is either ASP.NET Web Application or ASP.NET MVC 2 Web Application.
Can anyone advise?
You actually don't have to remove MVC 2. You can have v1 and v2 installed side-by-side with no issues.
Remove MVC2 and download and install MVC 1 from here

Migration from ASP.NET MVC2 Priview 2 to MVC2 RC: Any breaking changes?

I'm trying to migrate from ASP.NET MVC2 Priview 2 to MVC2 RC, because new version of Telerik is enforcing it.
I had big problems while migrating from MVC 1.0 to MVC 2.0 Preview 2, so I wanted to confirm with you guys before continuing.
Has anyone migrated from Prev2 to RC? Was there any problems? Are they easy to solve?
Any suggestions are greatly welcome.
Thanks.
Changes in ASP.NET MVC 2 RTM
No new breaking changes were introduced by the ASP.NET MVC 2 RTM release.
Changes in ASP.NET MVC 2 Release Candidate 2
Every property for model objects that use IDataErrorInfo to perform validation is validated, regardless of whether a new value was set. In ASP.NET MVC 1.0, only properties that had new values set would be validated. In ASP.NET MVC 2, the Error property of IDataErrorInfo is called only if all the property validators were successful.
Changes in ASP.NET MVC 2 Release Candidate 1
IIS script mapping script is no longer available in the installer
The IIS script mapping script is a command-line script that is used to configure script maps for IIS 6 and for IIS 7 in Classic mode. The script-mapping script is not needed if you use the Visual Studio Development Server or if you use IIS 7 in Integrated mode. The scripts are available as a separate unsupported download on the ASP.NET CodePlex site.
The Html.Substitute helper method in MVC Futures is no longer available
Due to changes in the rendering behavior of MVC view engines, the Html.Substitute helper method does not work and has been removed.
(See the Release Notes here for more information)

Should I start a new ASP.Net MVC project with MVC 2 RC?

I have a new ASP.Net MVC application that I am about to start and I am wondering if its worth my while to use the 2 RC version over MVC 1.
Will my MVC 1 applications upgrade easily to MVC 2 if I do continue with 1?
I'd suggest you start it by using MVC 2 RC. If you decide to use MVC 1 and you haven't modified or extended anything too deeply in MVC 1 upgrading won't give you much pain.
But I think MVC 2 RC is reliable to start developing a new app. My 2 cents...
It all depends on your requirement MVC 2 is still beta but.
MVC 1 app can be upgrade to MVC 2 with lots of trouble, you can easily convert Uprade from this link http://weblogs.asp.net/leftslipper/archive/2009/10/19/migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx

Resources