简体   繁体   中英

How to open my project in visual studio 2019 using python code

My goal is to build my project automatically using python in visual studio 2019. I'm able to open visual studio using python code (by importing subprocess and calling it) but when I open particular code file in visual studio it's throwing error:

File couldn't be found and cannot be loaded

When the same file I'm opening manually it is getting opened in visual studio, and the whole project is visible there as well.

But with python code it is throwing error.

Solution:

subprocess.Popen([r"PathofVS2019-executable",r"PathofYourProjectFolder"])

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM