Visual Studio resx editor creating a duplicate designer file

In my current project, whenever I add, update, or delete a resource, the tool creates a copy of the constructor file that twists things. I do not see this behavior with my other projects, and as far as I can tell, I implement the resources in the same way. Can anyone shed light on this behavior? Thanks

+4
source share
2 answers

Unfortunately, I don’t know what caused this for me, but after I spent a bit of time finding a job that seems to work without problems for me.

I simply deleted the designer file and rebuilt my project. This automatically recreates the constructor file, and everything continues to work as usual.

The only noticeable difference is that the designer file now has 1 at the end.

eg. String.resx -> Strings1.Designer.cs

I have made changes to this file in the past and without problems. If anyone can explain what got into this corrupt state, please share with us.

+2
source

Open the project file (using another editor, such as notepad, notepad ++, etc.) and find something like the following:

<Compile Include="YourResourceFilename1.Designer.cs">
  <AutoGen>True</AutoGen>
  <DesignTime>True</DesignTime>
  <DependentUpon>YourResourceFilename.resx</DependentUpon>
</Compile>

<Compile Include="YourResourceFilename.Designer.cs">..., , . , YourResourceFilename1.Designer.cs. , YourResourceFilename1 .
!:)

0

All Articles