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

MSBuild Support


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?


tomgross wrote Jul 22, 2013 at 4:00 PM

We were trying to run a PyTools test suite but get this error
using the BuildProcessTemplate "DefaultTemplate.11.1.xaml" from Visual Studio / TFS 2012

We are willing to help with information and contributions if we can.

Zooba wrote Jul 22, 2013 at 5:59 PM

As you can probably tell from this issue, we don't support doing anything with MSBuild right now. We would like to collect up ideas about things that should be possible though.

The easiest way to resolve your issue is to add <Target Name="CreateManifestResourceNames" /> to your .pyproj (and then whatever other targets need to be added).

The contributions we'd like are basically a .targets file that has useful targets for invoking from MSBuild and VS, so we can import it into every .pyproj file. Portability and supporting multiple Python versions/interpreters are our biggest concerns here, which make it a much larger task than simply writing <Exec> elements.

Alternatively, we'd settle for building up a list of what targets people need and what tools we should support, so that we have some idea of what to add when we get to this.

cteague3 wrote Dec 2, 2013 at 8:38 PM

I have just been removing the Python projects from the Debug and Release configurations so msbuild doesn't try to "compile" them.