views:

75

answers:

1

Hi everyone,

by default, MVC 2.0 come with an english resource file in the System.Web.Mvc.dll. When you install the french version of Visual Studio 2010 (and probably other languages), it will add a localized resource file for this language in C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 2\Assemblies\fr\System.Web.Mvc.resources.dll.

On my servers, i have installed AspNetMVC2_VS2008.exe to have MVC 2.0 installed but it only contain the english language and i don't know how to install the other resources files. I also tried to copy the resource file from my computer but it doesnt work.

The only way that i've found to make it work is by changing the 'copy local' option to true for the System.Web.Mvc.dll reference in my project. That way, it will bring the dll with the resources files that i have on my computer.

But what if i didnt have installed the french version of Visual Studio 2010? I wouldnt have access to the french resource file of the dll. So how can i install the localized resources files for this dll?

alex

+2  A: 

There may be a way to 'really' install MVC 2.0 on your server, but why would you want to do that?

The 'copy local' option is perfectly OK because ASP.NET (MVC) apps can be deployed by simply copying the application (or a pre-compiled version) to the server. I find that using XCopy deployment makes my applications more self contained and easier to deploy because there is less configuration and installation work to be done on the server.

Marnix van Valen
since its a dll that many apps will use on my server, i thought it would be OK to install it on the server like i do for the Framework 4.0. But it doesnt solve the problem for the resource file. If for some reason, i just install the english version of Visual Studio 2010, i would not have access to the french resource file. How can i installed these files if i dont have VS??
Alexandre Jobin
Put the MVC assemblies with the localized assemblies into a folder in your project like you do with other 3rd party components and keep them under source control. That way you can be sure you always have the right version and all the localization assemblies.
Marnix van Valen
Alternatively you coukd try to register the resource assemblies (aka satellite assemblies) into the GAC manually. Have you tried that?
Marnix van Valen
i guest that if i put the resource assembly in the GAC, it will work. I didnt tried that. But it doesnt solve the problem of how can i obtain the satellite assemblies without installing localized Visual Studio 2010 if i want to have a french or spanish satellite assembly. They must be somewhere without the need to install all the Visual Studio localized version!
Alexandre Jobin