This question has already been answered:

After editing the Resources \ Strings.resx in Visual Studio, an extra Strings1.Designer.cs appears

Resources\ Strings.resx Strings.Designer.cs Strings1.Designer.cs 

After this, the project does not start.

It is necessary every time after editing the translation Strings.resx to delete Strings1.Designer.cs.

What is the problem?

When this happens, the second Compile Include is created.

  <Compile Include="Resources\Strings.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Strings.resx</DependentUpon> </Compile> <Compile Include="Resources\Strings1.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Strings.resx</DependentUpon> </Compile> <EmbeddedResource Include="Resources\Strings.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Strings1.Designer.cs</LastGenOutput> </EmbeddedResource> 

Reported as a duplicate member by VladD c # 30 Dec '16 at 20:22 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • Do you mean manual editing outside of Visual Studio or through the Visual Studio editor? - VladD

1 answer 1

Check what is contained in the project file (.csproj)

If the LastGenOutput tag indicates Resources1, for example:

 <EmbeddedResource Include="Resources\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources1.Designer.cs</LastGenOutput> </EmbeddedResource> 

Then remove the unit:

 <EmbeddedResource Include="Resources\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource>