For some reason any code generated by the windows forms designer is written to my Form.vb class instead to the Form.designer.vb class where it belongs. I hope you can help me figure out what is causing this.
I removed as much code as possible and was able to reproduce the issue with the following setup:
Namespace MyNamespace
public class Form
Inherits System.Windows.Forms.Form
End Namespace
This is actually all the code that is left in my form - no methods/ functions/ members. When I remove the Namespace declaration, the code is generated in the Form1.designer.vb file again.
Why does the Namespace interfere with the functionality of Visual Studio?
Adding the Namespace manually to the designer.vb file works for now. However i am not sure if visual studio might remove it during some actions when the designer.vb code is adapted.