Add existing React application as a React project in VS 2022

Kuljit 0 Reputation points


I was looking into the below link where it shows how to create a react app in VS 2022

Is there any way we can add an exising react application and run it in similart way from VS 2022.
Related to the question, how can we create react project file from an exising React application folder.


Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,793 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 28,846 Reputation points Microsoft Vendor

    Hello @Kuljit,

    Welcome to Microsoft Q&A forum.

    Based on the tests, there’s no way to directly port the existing React application to a React project in VS 2022.

    Visual Studio has a feature to create a new project from existing code(File > New > Project From Existing Code…), but it only supports Visual C++, PHP, Visual Basic and C# type of project currently.

    You can directly open the folder which contains the existing React application(File > Open > Folder…), but only four npm tasks are available(right-click the package.json file > Npm): npm run-script start, npm run-script build, npm run-script test and npm run-script eject. The .esproj file(project file) and the .sln file(solution file) will not be generated automatically, so it’s still not a project.

    You may try to create and use a new React project in Visual Studio.

    Please feel free to let us know if you have any further concerns.

    Best Regards,


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.