I need to generate another language translation file automatically based on my Resources.resx
file.
I already have the following lines present in my .csproj project file:
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Update="Properties\Resources.de.resx">
<DependentUpon>Resources.resx</DependentUpon>
</EmbeddedResource>
</ItemGroup>
With the above settings in place, the expected file Resources.de.resx
neither gets generated automatically nor does it gets updated automatically when I add a new key to the Resources.resx
file.
I think you need to change
to also include a generator like so
At least this is how it looks in my projects, I usually just add the resource files through the solution explorer
EDIT:
Sorry I should have read your
.csproj
more carefully, your approach is different from what I'm familiar with.In fact, I've changed the project files of one of my project to mirror yours and it generates both files correctly.
So it should work