This project has moved and is read-only. For the latest updates, please go here.

MSBuild Support

Dec 14, 2012 at 12:52 AM

We recently decided to switch to Python Tools and like how well it integrates into our solutions with other projects.  But we need to integrated the python tools projects with our build system (Team City).  However, there seems to be no way to publish a Python Tools project from the MSBuild command line.  (And it would be nice if a syntax error in a python source file caused our builds to break, but that's a different issue...)

Is there any way to publish from MSBuild?  Or are we going to have to come up with some other way of publishing, duplicating the settings of which files to publish, and so forth?

Dec 15, 2012 at 12:12 AM

At the moment we don't support publishing from within MSBuild, though it is possible to add MSBuild targets to .pyproj files that will be run by MSBuild.

If you use "@(Compile)" or "@(Content)" as an item list within the .pyproj then you won't have to reproduce the file list, and if you have other settings stored in the .pyproj then you can access those as well.

We may create some .targets files for our next release to support this use (I'll create an issue to track this), maybe including unit tests and syntax checking as well (you can probably use an Exec task with python.exe for now to at least test that your code imports).

I'm not sure how well versed you are in MSBuild, but the main reference is at and we'll be happy to help out if you need it (especially if you're willing to contribute a script back...?).

Dec 15, 2012 at 9:39 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.