Once you've installed Visual Studio Tools for AI, it's easy to bring existing Python code into a Visual Studio project.
Important
The process described here does not move or copy the original source files. If you want to work with a copy, duplicate the folder first.
-
Launch Visual Studio and select File > New > Project.
-
In the New Project dialog, search for "AI Tools", select the "From Existing Python code" template, give the project a name and location, and select OK.
-
In the wizard that appears, set the path to your existing code, set a filter for file types, and specify any search paths that your project requires, then select OK. If you don't know what search paths are, leave that field blank.
If your existing code is part of an Azure Machine Learning project, check the "Is Azure Machine Learning folder" to ensure successful conversion of important Azure Machine Learning configuration details like about Experimentation account, Workspace, compute context and more.
-
To set a startup file, locate the file in Solution Explorer, right-click, and select Set as Startup File.
-
If desired, run the program by pressing Ctrl+F5 or selecting Debug > Start Without Debugging.