Is there a custom language add-in for Visual Studio 2012 / VS11?

Well, I want to add PAWN language support in Visual Studio 2012.

But due to the lack of experience and the lack of textbooks / add-ons that I can edit, this is really a difficult task.

At the moment, I only want to add file types and a compiler, I do not need to use intellisense, but for syntax I can use syntax highlighting of C.

I know that there is an implementation of the OOK language and the Boo language, but these add-ins for VS2010 will not compile for VS2012.

How to do it?

Is there a language add-on (for VS2012) that I can edit / use as a base / use as an example?

My last attempt led to a black window / unusable VS2012 IDE.

+4
source share
2 answers

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> <!-- Set the IronPythonPath property by proving in different locations where Iron Python could be installed --> <!-- Regular LocalAppData --> <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> <!-- Experimental LocalAppData --> <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> <!-- Integrated Shell --> <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> <!-- Set the IronPythonPath property by proving in different locations where Iron Python could be installed --> <!-- Regular LocalAppData --> <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> <!-- Experimental LocalAppData --> <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> <!-- Regular LocalAppData VS10212 --> <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> <!-- Experimental LocalAppData VS2012--> <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> <!-- Integrated Shell --> <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: enter image description here

and when building: enter image description here

+19
source

Take a look at this CodeProject article Developing Extension Packages Using C # and a Source that appears to have been updated for Visual Studio 2012, as well as an older version of Visual Studio.

Here's a Microsoft article on creating an add-in .

Here's the second CodeProject article , part of the Visual Studio Extension series Part 2 Creating Add-ons .

+5
source

All Articles