vsx

How do I programmatically refresh/reload a VS project after modifying the underlying file?

浪子不回头ぞ 提交于 2019-11-30 21:43:28
I am developing a Visual Studio package and I have written some code that will make a file in Solution Explorer dependant upon another file. What this means is that it gives them the same relationship as code-behind files or designer files, where they appear nested under the parent file with a plus/minus icon. + MainForm.cs - MainForm.cs MainForm.Designer.cs MainForm.resx The code that I have written successfully and correctly modifies the underlying project file, however the change is not reflected in Solution Explorer until the project is closed and re-opened. I'm looking for some code that

How to write a Visual Studio extension for a template or markup language that supports embedded code snippets

橙三吉。 提交于 2019-11-30 17:33:07
Is it possible to write an extension for Visual Studio 2010 that provides syntax highlighting, intellisense, outlining, etc for a custom template or markup language supporting embedded code snippets , similar to the tooling for Razor in ASP .NET MVC 3? Can this be done without using private APIs, without access to Microsoft-internal documentation and, most importantly , without having to reimplement syntax highlighting, intellisense, etc. for the embedded programming language (i.e. C# or VB)? The SDK documentation seems to suggest that the Visual Studio editor supports embedded languages via

How to Extending vs2010 editor context menu for .js file?

笑着哭i 提交于 2019-11-30 15:48:05
I have a VS2010 VSIP package with several commands,Those commands are added to the javascript editor's context menu,and i am using <Group guid="guidPrettyJsCmdSet" id="ContextMenuGroup" priority="0x0600"> <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/> </Group> but it work only C# file,how to make it work for .js file? The HTML/CSS/JS code editors actually show different context menus than the main code editor. Unfortunately, the Guid/ID pairs for these context menus aren't published or defined in the Visual Studio SDK. However, there is a debug hook (since VS 2005 SP1) that lets you

Using vsx how do you create a sub menu with commands?

走远了吗. 提交于 2019-11-30 14:48:12
I have created the following vsct file xml. <?xml version="1.0" encoding="utf-8"?> <CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <Extern href="stdidcmd.h"/> <Extern href="vsshlids.h"/> <Extern href="msobtnid.h"/> <Commands package="guidMyVSXCommandsPkg"> <Menus> <Menu guid="guidMyVSXCommandsCmdSet" id="TopLevelMenu" priority="0x100" type="Menu"> <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE"/> <Strings> <MenuText>Work???</MenuText> <ButtonText>FigureMain</ButtonText> <CommandName>TryMainMenu<

VSIX Package doesn't include referenced project's dependencies

徘徊边缘 提交于 2019-11-30 14:47:23
We have a visual studio package (VS Package) that references a class library project (Project A). Project A in turn references another class library project (Project B). So the dependency structure looks like this: VS Package > Project A > Project B All projects exist inside the same solution and the dependencies have been set up as proper project references. If I build the package in visual studio and look in the bin/Debug folder all necessary assemblies are there including Project B's. However when the package is deployed, only Project A's assemblies are present and Project B's are missing.

How to write a Visual Studio extension for a template or markup language that supports embedded code snippets

假装没事ソ 提交于 2019-11-30 01:19:21
问题 Is it possible to write an extension for Visual Studio 2010 that provides syntax highlighting, intellisense, outlining, etc for a custom template or markup language supporting embedded code snippets , similar to the tooling for Razor in ASP .NET MVC 3? Can this be done without using private APIs, without access to Microsoft-internal documentation and, most importantly , without having to reimplement syntax highlighting, intellisense, etc. for the embedded programming language (i.e. C# or VB)?

How to Extending vs2010 editor context menu for .js file?

江枫思渺然 提交于 2019-11-29 22:56:54
问题 I have a VS2010 VSIP package with several commands,Those commands are added to the javascript editor's context menu,and i am using <Group guid="guidPrettyJsCmdSet" id="ContextMenuGroup" priority="0x0600"> <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/> </Group> but it work only C# file,how to make it work for .js file? 回答1: The HTML/CSS/JS code editors actually show different context menus than the main code editor. Unfortunately, the Guid/ID pairs for these context menus aren't

How to add context menu entries in website projects?

China☆狼群 提交于 2019-11-29 16:13:27
I'm not able to add context menu entries for website project items. How to reproduce the problem: Create a VS Package project Go to the vsct file and replace the groups section with: <Group guid="guidVSPackage1CmdSet" id="MyMenuGroup" priority="0x0600"> <Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS"/> </Group> <Group guid="guidVSPackage1CmdSet" id="MyMenuGroup" priority="0x0600"> <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_PROJNODE"/> </Group> <Group guid="guidVSPackage1CmdSet" id="MyMenuGroup" priority="0x0600"> <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_ITEMNODE"/> </Group>

Open a VS 2005 Solution File (.sln) into memory

旧时模样 提交于 2019-11-29 15:43:54
I would like to open into memory an existing .sln file. Example of a non-working method: private Solution2 OpenSolution(string filePath) { Solution2 sln; sln.Open(filePath); return sln; } If I have an instance of Solution2 then i can call the method Open; but how can i get an instance of Solution2 ? My goal is then to get the adequate project and read some of its settings... but that's easy having access to the solution. Thanks in advance, Luís You can programmatically create a hidden instance of Visual Studio, and then use it to manipulate your solution. This example will list out all the

How to add commands to Visual Studio 2012?

老子叫甜甜 提交于 2019-11-29 10:16:51
How can I add custom commands to the keyboard dialog (Tools->Options->Keyboard) in order to trigger them by shortcuts? Unfortunately, I could not find any resource on the web. I crossed this blog post , but it's slightly different, because I'd have to create a menu entry. I only want to show the commands in the keyboard dialog. Just like it worked with macros. I have not checked VS 2012 in this area, but I think it's the same as for previous version. All that menu and command stuff is localized in a file called [mypackage].vsct which is the Visual Studio Command Table. The schema is described