Installing a Custom Visual Studio Language Service

后端 未结 2 1720
小鲜肉
小鲜肉 2021-02-11 07:13

I\'ve written a new Visual Studio language service for my software studio\'s internal scripting language following the directions from a very useful article Writing Your First V

2条回答
  •  我寻月下人不归
    2021-02-11 08:00

    After getting the Tumbleweed badge on here I managed to track down the solution. There were a couple important bits people might find useful.

    First off a PLK (Package Load Key) is needed. It can be generated here: http://msdn.microsoft.com/en-us/vstudio/cc655795.aspx Be sure to make sure that all the information you enter is correct, and is entered into the Assembly for the dll.

    The PLK is installed by adding to the rsx file for the solution, usually as item 104, and then matching that item number in the ProvideLoadKey attribute in your code.

    Next testing the PLK is a bit of a hassle. Tips can be found here: http://msdn.microsoft.com/en-us/library/bb164677%28v=VS.90%29.aspx I highly recommend first using the /noVSIP switch with the experimental hive right from the start. I found using /log doesn't really help, it's much better to use the Package Load Analyzer once you've installed your package and are still having PLK issues.

    A more detailed description from the package load analyzer can be done with this command line: devenv /command tools.analyzepackage /analyzeargs {your GUID} analyzepkg.txt

    Once you're satisfied and ready to deploy, there is a tutorial that seemed more buried than it should be over at MSDN http://msdn.microsoft.com/en-us/library/bb458038%28VS.90%29.aspx

    One thing that I found was curious with the RegPkg tool found in the VS SDK bin directory was that it would cause my package to load fine in the development solution it existed in, but would not not load in other solutions. There appears to be an extra step to call devenv /setup which I was missing, and this is taken care of in the deploy tutorial I provided in the previous paragraph through the use of a Custom Action.

    Anyway I hope this helps someone running through the same process as me.

提交回复
热议问题