locked
Language services in Visual Studio-based application (isolated mode) RRS feed

  • Question

  • Hello everybody,

    I’m developing a Visual Studio-based application in isolated mode (VS 2013). So far everything has gone smoothly, I have programmed some VSPackages, they manage their windows with their items, doing their things.

    The problem arising is how to open a C# file (.cs) in the editor and have syntax coloring, statement completion and the rest of features provided by the language service. If I use VsShellUtilities.OpenDocument() the C# file is opened, but I have no language-specific support.

    I have read Language Services part of the Visual Studio SDK tutorial and now I’m exploring the Projects part, but I don’t think I need a new project type or language service. I think I would use the C# language service provided by VS “as is”. Should I load it, how?

    I would appreciate any suggestions and hints.

    Pedro.

    • Edited by pintope Thursday, February 12, 2015 6:18 PM
    Thursday, February 12, 2015 5:33 PM

Answers

  • Hi Pedro,

    The "isolated" shell does not ship with, nor does it allow the loading of the visual studio languages. You cannot open a C#, VB .NET, or C++ project in the isolated shell, as their respective packages are explicitly prevented from loading into the isolated shell.

    If you have a dependency on the C# language service, then you will need to integrate with Visual Studio itself.

    Sincerely,


    Ed Dore

    Saturday, February 14, 2015 3:44 AM

All replies

  • Hi Pedro,

    The "isolated" shell does not ship with, nor does it allow the loading of the visual studio languages. You cannot open a C#, VB .NET, or C++ project in the isolated shell, as their respective packages are explicitly prevented from loading into the isolated shell.

    If you have a dependency on the C# language service, then you will need to integrate with Visual Studio itself.

    Sincerely,


    Ed Dore

    Saturday, February 14, 2015 3:44 AM
  • Thank you Ed. Ok, no C# projects and no language services.

    If I only wished to compile simple mathematical functions, I think I could use Reflection and CSharpCodeProvider as a substitute (still in Isolated Mode). Extending the editor with MEF I could do some coloring. Do you think this manual approach is reasonable?

    Regards.

    Pedro.
    Sunday, February 15, 2015 4:37 PM