This documentation is archived and is not being maintained.

IronPython Project System Sample

Visual Studio 2005
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The IronPython project system is a project type that extends the Visual Studio project system. For more information on project types, see Project Types.

NoteNote

The IronPython project system does not currently support project subtypes.

Security noteSecurity Note

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices.  Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

The IronPython project system:

  • Defines a VSPackage that controls the interaction between Visual Studio and the IronPython compiler.

  • Participates in building, deployment, and source code control.

  • Includes MSBuild targets and templates.

  • Offers debugging support, but no expression evaluator.

  • Displays and manages project items in the Solution Explorer.

  • Participates in the Open Project and New Project dialog boxes.

  • Exposes project and configuration properties, both generic and specific to IronPython, such as the "main" program file.

  • References web services, databases, and other resources, but not other IronPython assemblies.

    NoteNote

    IronPython assemblies are not consumable by other assemblies.

  • Supports automation.

  • Connects the Windows Form Designer to the IronPython CodeDom. For more information, see IronPython Windows Forms Designer and CodeDOM Sample.

NoteNote

IronPython assemblies are marked as Any CPU. No project properties are provided to mark IronPython assemblies to execute in 32-bit mode. IronPython assemblies that run on a 64-bit system and reference 32-bit COM assemblies will fail to load them.

To build and run the sample

  1. Open the IronPython.sln solution in the <Installation Path>\VisualStudioIntegration\Samples\IronPythonIntegration folder.

    NoteNote

    This sample includes the PythonProject project, which contains an overview document with detailed implementation notes. To open it, right-click PythonProject\Overview.xml and click View in Browser.

  2. Press F5 to build the sample, register it in the experimental hive, and start Visual Studio from the experimental hive.

To see the sample's functionality

  1. On the File menu, click New Project to display the New Project dialog box.

  2. Create a new PythonProject Console Application.

    The new solution appears in Solution Explorer, the file Program.py appears in the code editor, and the project properties appear in the Properties Browser.

  3. Right-click the project node and click Properties.

  4. The Property Pages dialog box appears and displays the common and configuration properties.

  5. Close the dialog box. Press F5 to build and run the IronPython program Program.py.

    A console window opens, displays "Hello VSIP!", and closes.

Demonstrates

See Also

Other Resources

IronPython Samples

Show: