locked
Cannot create VB project from existing code. RRS feed

  • Question

  • I have tried to create a new VB project in Visual Studio 2019 from existing code. I don't get an error. It just doesn't load the source code. 

    Wednesday, June 12, 2019 7:38 PM

All replies

  • Hi

    How did you get the existing code into the new project. Step by step please.


    Regards Les, Livingston, Scotland

    Wednesday, June 12, 2019 7:43 PM
  • I have tried to create a new VB project in Visual Studio 2019 from existing code. I don't get an error. It just doesn't load the source code. 


    You are probably going to have to create the project and  then add 'Existing' files to the project, after you copy the old files to the new project's folders.
    Wednesday, June 12, 2019 8:40 PM
  • Hello,

    If you create a new VB.NET project, add a button to the form, double click on the button and add MessageBox.Show("Hello") the compile and run, click the button if that works then the problem is not Visual Studio per say. 

    We need to see the code you have added (from existing code) to make an informed decision what is going on.

    Also, make sure you have not tampered with the designer file or have added a Sub New without IntitializeComponent in it.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Wednesday, June 12, 2019 8:47 PM
  • 1. I copied the code to a directory on the Windows Server.

    2. I brought up Visual Studio 2019 on the server.

    3. Picked New->Project from existing code.

    4. Picked Visual Basic from options on window.

    5. In "Where are the files" I chose D:AAReddiCode/sourcecode

    6. Under "Name" I put ReddiBooksDev

    7. Under "Output type" I put Windows Application

    It loads all my data files but it is not loading my code files. I don't get the initial VB code window.

    Wednesday, June 19, 2019 5:01 PM