Two output file names resolved to the same output

后端 未结 21 965
攒了一身酷
攒了一身酷 2020-12-13 23:50

Recently I created new Form called WorkersScreen. When I try to run the project I got this error:

Error 1 Two output file nam

21条回答
  •  别那么骄傲
    2020-12-14 00:13

    I had the same issue when I renamed one of my Form classes using Ctrl + R + R which VS provides to rename things by default.

    Then I somewhat got two classes with the same class name on 2 different files (*.cs).

    class Bar { ... } // From Bar.cs
    class Bar { ... } // This should've been Foo, from Foo.cs
    

    The two Bar indicating the same resource file that one of them shouldn't.

    It's a trivial issue but sometimes could be hard to find the cause because looking at cs files just can't say which one is what you should look for.

提交回复
热议问题