Visual Studio duplicating resource .cs file

前端 未结 3 1541
谎友^
谎友^ 2021-02-03 21:22

Visual Studio has begun exhibiting a rather irritating quirk. When I edit a resource file (using either the designer view or editing the XML directly), it creates a duplicate re

相关标签:
3条回答
  • 2021-02-03 21:51

    Clear the "Custom Tool" entry. appropriate rpt file it's located right click on rpt file --> properties ---> custom tool ---> clear

    0 讨论(0)
  • 2021-02-03 21:56

    Replace in .csproj file the code like below:

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

    With code like below:-

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

    Source: http://www.codeproject.com/Questions/227676/Resource-file-regenerating

    0 讨论(0)
  • 2021-02-03 22:00

    In case this happens to anyone else and you find yourself here, Hans' comment above pointed me toward the project file. I had to close the solution, find the LastGenOutput tag in the project XML file, and change the name of the resource output back to ProjectSQL from ProjectSQL1.

    I still have no idea how this happened. But at least it's fixed now.

    0 讨论(0)
提交回复
热议问题