I just found in another post to delete the component and then pasting it again. I tried and it works.
VS 2022 Ignores new form added into the project
Ben Junior
11
Reputation points
Using VS2022 v 17.10.4 When I add a new component into the project , VS ignores its existence. I have to close VS, delete the obj and the bin folders, reopen VS, clear and rebuild the solution and it works for awhile until it happens again. In the picture below, it shows that it does not detect the error in the form. It compiles and run. Depending on what part of the project I am working on, it can take me a lot of time to figure that the problem is in this newly added form where the added context is being ignored by VS