views:

17

answers:

1

I work on a multi culture web project. I use Localize and Global Ressources(resx) as multilang technology.
I work in team with 2 developer. How can we share .resx . When my teammate give me the 2 Files ( myfile.resx and myfile.Designer.cs) and I include it in my project, there is no way i can add some new string in the file. The new string seem to not be copy in the myfile.Designer.cs ...
I Miss something here.

I Use Asp.net MVC 2

A: 

If you are just manually adding an existing RESX and its designer file to your project then you might have to manually connect them together so that VS knows they are related. You will have to manually edit your .csproj file. Here's an example of how to connect the two:

<ItemGroup>
  <Compile Include="Resources\MyResources.Designer.cs">
    <AutoGen>True</AutoGen>
    <DesignTime>True</DesignTime>
    <DependentUpon>MyResources.resx</DependentUpon>
  </Compile>
</ItemGroup>
<ItemGroup>
  <EmbeddedResource Include="Resources\MyResources.resx">
    <Generator>ResXFileCodeGenerator</Generator>
    <LastGenOutput>MyResources.Designer.cs</LastGenOutput>
    <SubType>Designer</SubType>
  </EmbeddedResource>
</ItemGroup>
marcind
Thanks marcind. This is the Right Answer. Save hour of googling .
Jean-Francois