0

I have a few questions:

  1. Is there any way through which I could create a Visual Studio Project, add files to it, and build it from within a Python program?

  2. Are there built-in commands to do this? If not any commands which could be run in command line?

Thanks for the help.

4

2 Answers 2

1

is there any way through which I could create a Visual Studio Project, add files to it

Whilst there is a .NET API for creating/manipulating project files, it's a bit on the undocumented side (I have used it in the past though) and I don't know if you can call it from Python. If you want to see the .NET API just look at the IronPython Custom Project Extension project.

However, VS project files are just XML files so if you know the schema, you can just write to the files from Python using your API of choice. VS won't know any better.

and build it from within the python program

Ultimately you can just spawn a process to invoke msbuild. Works for Jenkins.

Sign up to request clarification or add additional context in comments.

Comments

0

Recently it looks like Microsoft has released Python tools for Visual Studio found here.

There is an Iron Python NuGet package that is tightly integrated with .NET, but not sure you'd want to use this for pure Python programming. I would also recommend Jetbrain's PyCharm which is an IDE also suited for Python or just use Notepad++ (free) and compile from the command line.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.