views:

31

answers:

3

Hi Guys.

I have a problem. I am developing Asp.Net MVC2 Application with VS2008 very well, but now I want to use the amazing DataAnnotion Validation shipping with Microsoft.MVC.DataAnnotation.dll. I cant find the dll so I found them on the project Site @ http://aspnet.codeplex.com/releases/view/24471#DownloadId=61772

I cant compile the Project. Is it a VS 2010 or .Net 4.0 thing ? Do I need VS 2010 or is there a way to use it within VS2008 ?

Thanks a lot guys, sorry about my bad english ;)

+1  A: 

follow this guide: http://stephenwalther.com/blog/archive/2008/09/10/asp-net-mvc-tip-43-use-data-annotation-validators.aspx

maybe you just need to service pack your vs

Andrea Balducci
A: 

ive got vs2008 sp1 but it doesnt work. why i thought that it requires .Net 4.0 is that all samples are made with vs2010 even the sample that you post.

thanks anyway

Denis
A: 

You don't need VS2010, you can use Data Annotations with VS2008 and .net 3.5

The example above actually works in VS2008. I just verified it.

Also the dll you mentioned above is the wrong dll for MVC2, instead of Microsoft.MVC.DataAnnotation.dll, you want System.ComponentModel.DataAnnotations which should be part of .net 3.5.

CodeHobo