Port vscode (visual studio code) language server to Visual Studio extension - ansible

I want to add ansible DSL (based on yaml) support for Visual Studio 2022 (with extension), I found a language server for ansible DSL in visual studio code, and I want to port this language server into my extension for Visual Studio 2022.
Can anybody point to any references or even examples of existing porting?
I think porting with minimal changing is very useful, because we can update language server based on original language server with every changes.
I request sample in https://github.com/microsoft/VSSDK-Extensibility-Samples/issues/279#issue-1589674661

Related

Can a language extension written in Visual Studio Code be used in Visual Studio 2017?

I am writing a language extension in Visual Studio code (see this article for an example), and I wish to know whether this extension will be useable in Visual Studio 2017 (and 2019 when it comes out).
According to the visual studio docs and especially to this picture it should be possible to migrate that language server to visual studio, too.
However it is not possible to use the exact same extension for VS Code as well as for Visual Studio. At least you will have to change the Provider-specific intizialization code (see the picture) to make the server work for Visual Studio, too.
For further reading you can check out the corresponding VS Code docu on language server.

Use Visual Studio for custom script language

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?
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:
Create a custom Editor and/or designer
Add a language service
Add Project and Item templates
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.
Creating Project Types

Other project types is empty in visual studio 2008

In my system when I click on Add->new project->And go to Other project types I cant see any project types. I actually wanted to convert my c# project to executable.
Is any component missing during installation? I am using Visual studio 2008 professional edition
Please help me..
I had the same issue until I looked into what software I was ACTUALLY using - check to see if you're really using Microsoft Visual Studio 2008 - I thought I was until I realized I was using Visual Studio 2008 Shell (integrated mode) which is different.
Microsoft Visual Studio 2008 Shell (integrated mode) is part of the SQL Server 2008 Management Studio, so the project types available to it are different than MSVS 2008... Microsoft developed the Shell to have the same look and feel of Visual Studio so users were comfortable and familiar with the layout.
Go to Tools>>Import and Export Settings>>Reset all settings>>Choose yes or no to save current settings>>
Then choose Visual C# Development Settings or General Development Settings.
So that you can have templates you need.
You can reopen your VisualStudio ISO and try to repair or you can install VisualStudio Express to make sure you can install all templates.
My guess is you didn't make a full installation and forgot to install some components.

How can I add C# language support to Visual Studio 2010 shell?

Greetings,
I'm using Visual Web Developer Express 2010 to do some development; I have also the Visual Studio 2010 Shell installed, which I use to debug server and client code, using the Debug>Attach to process command.
My problem is that C# (.cs) files open in the shell as if they're plain text files; there's no syntax colouring nor value evaluation on mouse hover over properties or values.
Sometimes when I open ASP.Net pages in the shell I get an error message saying "The Visual Studio language support for C# has not been installed. Code-editing IntelliSense will not be available. Markup IntelliSense for server controls may not work".
VB.Net language support is working well in the shell. I get all the features I have in Visual Studio Express.
Is there a way to get C# language support in the shell?
The Express editions of Visual Studio are a little different than the other SKUs (Professional, Ultimate, etc.) in that there are separate products for the various .NET languages.
My guess is that you have Web Developer Express installed, but in order to open C# code files with the full support of the editor (syntax highlighting, debugging, etc.) you need to download and install Visual C# Express. Multiple versions of Visual Studio Express work side-by-side just fine.
See here to download Visual C# Express 2010 free from Microsoft: http://www.microsoft.com/express/Downloads/#2010-Visual-CS

Why do Visual Studio solutions need to be upgraded with every release of Visual Studio?

This is easily one of the most annoying "features" of Visual Studio in its history and I don't understand why it exists -- ever.
Why would a CodePlex project need to care what version of Visual Studio I am using?
Off the top of my head, the only thing I can think of is that some versions of Visual Studio might introspect assemblies searching for attributes to determine what to display in "Visual Designers" and "Property Editors". But why would that cause Visual Studio to not be able to open the project and allow me to browse its contents and compile?
It seems to me like Open Source in .NET is somewhat limited by the stupid dependency management exhibited by Visual Studio. In other words, if I am using Visual Studio 2008 and you are using Visual Studio 2010, then we have different solution files.
http://blogs.msdn.com/b/visualstudio/archive/2010/03/15/why-does-visual-studio-2010-convert-my-projects.aspx
Here's an example from the site as to why Visual Studio converts your projects to 2010 format.
For instance, Visual Studio runs
custom tools such as single file
generators for designers in order to
output code representing the changes
made to the designer. Many of these
custom tools are upgraded or
completely replaced in the newer IDE.
During conversion, the IDE knows which
custom tools to replace or upgrade. In
order to make round-tripping work, VS
would need old and new custom tools to
understand each other so as to ensure
that old and new designers can work
side by side. Other than designers,
the following files would also be
affected: resource editors, wizards,
code snippets, item and project
templates, diagramming and modeling
tools, and many more.tools, and many more.
Since 2010 knows about what tools 2008 has, it can convert forward to be compatible with the custom tools 2010 uses. 2008 has no idea about what 2010 is using, how could it? Therefore, it is impossible to convert backwards since it doesn't know what it needs to convert, nor how to.
I believe the purpose of this touches on what you stated in your comments. If you are using 2008 and I 2010 and I compile it, how could you possibly run it again? 2010 is backwards compatible but 2008 has no way to make itself forward compatible.
Thus, by recompiling the project in 2010 I ensure that no 2008 user may mistakenly think they can compile it.

Resources