By building as Class Library - All the resources keep getting lost

tovia schlesinger 241 Reputation points
2021-10-10T17:55:45.477+00:00

When changing my project from a "Windows Form Application" to a "Class Library"
and then building it, the resources keep getting lost creating many errors, that the resources are missing.
So, to work around this problem, I kept a copy of all the resources, and I copy the resources back in every time.

How can I prevent this from happening?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,962 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 25,626 Reputation points Microsoft Vendor
    2021-10-11T07:49:39.497+00:00

    Hi @tovia schlesinger ,

    Welcome to Microsoft Q&A!

    What is your target framework? You can check it by right-clicking project > Properties > Application.

    Please check if you put your resource file in bin folder of your project folder or not. if so, it will be deleted when re-building project.

    In order for us to investigate it further, could you share us more reproduce steps or screenshots about the errors?

    Sincerely,
    Anna
    *
    If the answer is helpful, please click "Accept Answer" and upvote it.
    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.

    0 comments No comments

  2. tovia schlesinger 241 Reputation points
    2021-10-11T21:00:17.563+00:00

    my framwork i use is
    .Net Framwork 4.8
    139530-error.png

    this is the picture of my
    Namespace My.Resources

    most Propertys got deleted by building the first time to as Class Library
    then i copy of all the resources, and I copy the resources back in
    avry time i build it


  3. tovia schlesinger 241 Reputation points
    2021-10-14T16:57:49.937+00:00

    i will try this next week

    0 comments No comments