Error message BC31502 "Resource name ___ cannot be used more than once"

Simon 466 Reputation points
2022-05-25T18:03:59.883+00:00

When trying to run my project, I keep getting this error message Error message BC31502 "Resource name ___ cannot be used more than once".
It shows me the File location of the error "vbc", but there is no such file in that directory that is being specified.

Developer technologies Visual Studio Other
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2022-05-26T06:34:35.357+00:00

    Hi @Simon ,

    Welcome to Microsoft Q&A!

    Which version of Visual Studio are you using? What is your project type?

    It seems that the name of a specified resource is used more than once.
    Please click on “Show All Files” on the solution explorer and check if you can find two resource files. You can delete the second one like .resources1.

    If it doesn’t work, please close all VS instances and delete the hidden .vs, bin and obj folders in the project folder.
    Then, relaunch your VS to run again.

    Sincerely,
    Anna
    *
    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Simon 466 Reputation points
    2022-05-26T14:43:30.803+00:00

    Microsoft Visual Studio Enterprise 2022 (64-bit) - Current
    Version 17.2.2

    my projects are vb.net, target framework 4.8

    all my projects suddenly became damaged after clients are using the application and haven't had a problem.
    This occurred after updates came in automatically from VS2022.
    I think that the new updates are not compatible with the method that VS is using Framework 4.8. Because the errors that are being generated are not the usual errors that are standard in a Microsoft project.
    It doesn't make sense that all my projects should become damaged all at once, and suddenly error messages are coming up one after the other.
    What could this mean?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.