A simple Python Script that allows you to Convert basic projects to and from Visual Studio Code and Visual Studio 2022.
This is intended to work cross-platform, as such:
- Windows VS Code <-> Windows VS 2022
- Mac VS Code <-> Windows VS 2022
- Linux VS Code <-> Windows VS 2022
So all OS's can convert a VS 2022 Code project from Windows to a VS Code project for editing capabilities, and then back to a VS 2022 project to be ran on Windows.
- Prerequisites
- Program Usage
- Example Project Conversion Scenario
- Base file structure
- Converted file structure
- VS 2022 file structure
- Notable Resources
All you need to run this program is:
- to have downloaded the latest zip of this repository (You may click (here) to auto-download from github)
- and at least Python 3.12 (earlier may work, but older versions are untested). You may find Python here (https://www.python.org/downloads/) or installed via homebrew or in the Microsoft Store.
Currently there is only two ways to use the program:
python .\main.py [your project folder path here]
to convert a project. Example usage: [python .\main.py 'c:\Users\You\Desktop\ImportantProject\
]python .\main.py [project folder path here] [project type]
where[project type]
is either:C++
C#
Base file structure for C program:
- [Project Name]
main.c
- main program, includes "utils.h"utils.c
- defines functions for "utils.h"utils.h
- function headers and includes for main and "utils.c"inputs.dat
- some input file to read fromoutput.txt
- some output file to write to
Converted file structure for VS 2022
- [Project Name]
- [Project Name]
main.c
- main program, includes "utils.h"utils.c
- defines functions for "utils.h"utils.h
- function headers and includes for main and "utils.c"inputs.dat
- some input file to read fromoutput.txt
- some output file to write to[Project Name].vcxproj
- Outlines project configurations and files to include[Project Name].vcxproj.filters
- Classifies files for Visual Studio to categorize files into, such as "Source Files", "Header Files", and "Resourse Files"
[Project Name].sln
- Solution file for VS 2022 to read
- [Project Name]
Which then the file structure will look like this in Visual Studio 2022:
- Header Files
utils.h
- Resource Files
inputs.dat
output.txt
- Source Files
main.c
utils.c
Below is a link to Visual Studio project GUIDS, for both myself's future reference, and your curiosity: https://stackoverflow.com/questions/10802198/visual-studio-project-type-guids
Also below is a link to my colleague's version of my project, go check it out!! https://github.com/Huskiefusion/vs-sln-gen (Note: This repo may be private)