The official language example extension for Visual Studio 2010 was Iron Python Integration Example.
You can download it here: IronPython Integration . There is related documentation here: Visual Studio IronPython Integration Deep Dive
Unfortunately, this sample has not been updated for Visual Studio 2012, as far as I know. However, here are the steps to convert it to Visual Studio 2012.
- install the Visual Studio 2012 SDK here: Microsoft Visual Studio 2012 SDK
- download Iron Python integration sample, extract somewhere to your disk
- open
IronPython.sln and accept all upgrade conversions - change the target project platform from
AnyCpu to x86 - Some projects have incorrect (automatically scheduled) links to Visual Studio 11 builds (built on .NET 4.5), so they wonβt compile as they are. Change them to Visual Studio 10 builds. For example, Microsoft.VisualStudio.ExtensibilityHosting.dll in the IronPython.Console project should indicate the equivalent file in
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies . - define the
IronPython.Project project as a launch project and update its debugging parameters: to start, you need to run the external program C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe (VS 2012), and not C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe (VS 2010 Shell) which was installed by default. Command line arguments must be set to /RootSuffix Exp - update all base templates to use VS 2012 directories instead of only VS 2010: find the line
IronPython.targets in the entire .pyproj file and add a VS 2012 case, for example:
front:
<PropertyGroup> <IronPythonPath Condition=" '$(IronPythonPath)' == '' AND Exists('$(LocalAppData)\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython\1.0\IronPython.targets')">$(LocalAppData)\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython\1.0</IronPythonPath> <IronPythonPath Condition=" '$(IronPythonPath)' == '' AND Exists('$(LocalAppData)\Microsoft\VisualStudio\10.0Exp\Extensions\Microsoft\IronPython\1.0\IronPython.targets')">$(LocalAppData)\Microsoft\VisualStudio\10.0Exp\Extensions\Microsoft\IronPython\1.0</IronPythonPath> <IronPythonPath Condition=" '$(IronPythonPath)' == '' AND Exists('$(MSBuildExtensionsPath)\Microsoft\IronPython Studio 2010\1.0\IronPython.targets')">$(MSBuildExtensionsPath)\Microsoft\IronPython Studio 2010\1.0</IronPythonPath> </PropertyGroup>
after
<PropertyGroup> <IronPythonPath Condition=" '$(IronPythonPath)' == '' AND Exists('$(LocalAppData)\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython\1.0\IronPython.targets')">$(LocalAppData)\Microsoft\VisualStudio\10.0\Extensions\Microsoft\IronPython\1.0</IronPythonPath> <IronPythonPath Condition=" '$(IronPythonPath)' == '' AND Exists('$(LocalAppData)\Microsoft\VisualStudio\10.0Exp\Extensions\Microsoft\IronPython\1.0\IronPython.targets')">$(LocalAppData)\Microsoft\VisualStudio\10.0Exp\Extensions\Microsoft\IronPython\1.0</IronPythonPath> <IronPythonPath Condition=" '$(IronPythonPath)' == '' AND Exists('$(LocalAppData)\Microsoft\VisualStudio\11.0\Extensions\Microsoft\IronPython\1.0\IronPython.targets')">$(LocalAppData)\Microsoft\VisualStudio\11.0\Extensions\Microsoft\IronPython\1.0</IronPythonPath> <IronPythonPath Condition=" '$(IronPythonPath)' == '' AND Exists('$(LocalAppData)\Microsoft\VisualStudio\11.0Exp\Extensions\Microsoft\IronPython\1.0\IronPython.targets')">$(LocalAppData)\Microsoft\VisualStudio\11.0Exp\Extensions\Microsoft\IronPython\1.0</IronPythonPath> <IronPythonPath Condition=" '$(IronPythonPath)' == '' AND Exists('$(MSBuildExtensionsPath)\Microsoft\IronPython Studio 2010\1.0\IronPython.targets')">$(MSBuildExtensionsPath)\Microsoft\IronPython Studio 2010\1.0</IronPythonPath> </PropertyGroup>
What is it. Compilation and launch (both may take some time for the first time due to registration secrecy).
Here is the result when starting a new Iron Python project from Visual Studio 2012: 
and when building: 
source share