none
My VB.NET project code got replaced with random numbers, how can I turn my project back to normal?

    Question

  • When I opened my solution, none of the files loaded in visual studio. When I opened my form in the solution explorer, the code was replaced with random numbers. When I run the exe file, it plays an older version of my project. I saved my project properly before this bug happened, and I didn't save my project after this bug happened. My other Visual Basic projects are working normally.

    My form code after this problem happened: https://ibb.co/hfG0GF

    Wednesday, March 15, 2017 3:29 PM

All replies

  • Hi Firedude953,

    Welcome to MSDN forum.

    Please check if your project is created in the old version of visual studio and open it in the latest version, if it is, please update your vb.net project.

    Meanwhile, please set visual basic form editor as default.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, March 16, 2017 6:39 AM
  • My project was created in Visual Studio Community 2015, which I am currently using. Visual Basic Form Editor wasn't an option in the "Open With" menu.
    Friday, March 17, 2017 1:13 AM
  • Hi Firedude953,

    Welcome to MSDN forum.

    Please create a new default project and copy your project to here, build and save it to check if the issue persists.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, March 17, 2017 9:33 AM
  • I tried building my project in a new blank solution and building a new project (of the same name and type) with it's Form1 files replaced by my Form1 files. The problem was still the same as before. I think it's my Form1 behaviour source code that isn't working, because my Form1 Designer source code wasn't replaced with random numbers.
    Friday, March 17, 2017 4:33 PM
  • Hi Firedude953,

    Can you share a screen shot about all files' structures in your solution explorer window?

    This is mine:

    (1) If you open the vb file in your notepad, how about the result? If it still has this issue, it means that your project file was corrupt.

    If you could see the code using the notepad, just add the matched controls to the Designer files, and just copy the code to a new vb file would be a workaround. But I feel that the VB file was broken in your side.

    If you get any latest information, please feel free to let me know.

    Thanks,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 20, 2017 10:26 AM
    Moderator