3

We are using a commercial software that has its own scripting language with which you can customize the product. It is very tedious to write code in it without any help from an IDE and it has its own compiler.

Is it possible to use Visual Studio and create an environment for me to write scripts in this language and get the help of intellisense and syntax highlightning and other good things you find in an IDE? Ideally I would like to bind a button in VS to launch the external compiler and compile the code so I don't have to switch windows all the time as well.

If this is possible is it a very hard thing to accomplish?

4
  • 1
    I don't think VS is really designed for that sort of thing (though I could be wrong - I haven't ever tried). In any case, I know that notepad++ is specifically designed for exactly that sort of thing. Commented Jan 31, 2014 at 16:26
  • 1
    @neminem: VS is precisely designed for that sort of thing. Where do you think the C#, VB.NET, etc. environments come from? They are all additions to the core Visual Studio. Commented Jan 31, 2014 at 17:09
  • @JohnSaunders I thought they came from Microsoft. I just didn't know that it was easy to add your own custom environments for other languages. I always used notepad++ for that sort of thing (though I use VS for .net languages). I'm fine being proven wrong, so, don't listen to me. (Though still listen to me in that notepad++ is a fine solution, anyway. :p) Commented Jan 31, 2014 at 17:37
  • @neminem: yes, they come from Microsoft, but this is how Microsoft does it, and it's well documented in the Visual Studio SDK. Commented Jan 31, 2014 at 19:50

1 Answer 1

6

Yes, this is certainly possible. You need to create a Visual Studio Shell add-in with custom language services and text editors. You need to install the appropriate Visual Studio SDK and then you'd continue to:

You're allowed to ship Visual Studio Isolated Shell with your application (license required and there are some limitations) so that your users don't need to have Visual Studio Professional installed.

There are a number of open-source projects that provide a custom editor, language services etc in Visual Studio, these could provide a nice place to research how things are done, next to teh Visual Studio SDK documentation:

  • PyTools, which is a Visual Studio editor for IronPython
  • Phalanger, which contains a Visual Studio editor for PHP
  • PoShTools, a Visual Studio service for PowerShell editing right inside Visual Studio

You'll probably want to dig into MsBuild as well, since Visual Studio will expect you to create a project file if you want to edit a collection of files and compile them. MsBuild could in turn call your own compiler, like it calls csc to compile C# code for example.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.