visual-studio-extensions

How to create and install test adapter in Visual Studio

早过忘川 提交于 2019-12-04 14:24:27
问题 I want' to create a protractor test adapter for Visual Studio. I have found I can create it with implementing ITestExecutor and ITestDiscoverer. I follow the Marcel De Vries documentation (https://xpirit.com/wp-content/uploads/2016/03/Xpirit-magazine-2-Protractor-UI-testing.pdf) but I can't found how to add my extension in Visual Studio. I have tried to add my assembly directly in the \Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions folder. I have tried to create a Vsix and

How to debug code compiled with Roslyn in a Visual Studio extension inside current Visual Studio host?

南楼画角 提交于 2019-12-04 14:08:16
问题 I have a Visual Studio extensions that use Roslyn to get a project in current opened solution, compile it and run methods from it. The project can be modified by the programmer. I have successfully compiled a project in a Visual Studio extension from the current VisualStudioWorkspace. private static Assembly CompileAndLoad(Compilation compilation) { using (MemoryStream dllStream = new MemoryStream()) using (MemoryStream pdbStream = new MemoryStream()) { EmitResult result = compilation.Emit

Export/Import VS extensions list?

喜夏-厌秋 提交于 2019-12-04 12:33:21
Is there an easy way to backup the installed extensions list in VS (2017), so that when I install the machine anew I can easily install my regular extensions at once? Note: I've found this question that asks an identical question to my own, except it targets VS Code, whereas my question is about Visual Studio for Windows. Roaming Extension Manager is built in Visual Studio 2017: The Roaming Extension Manager helps you keep track of all your favorite extensions across all of your development environments. Roaming your extensions keeps track of the extensions you have installed by creating a

Visual Studio Text Editor Extension

牧云@^-^@ 提交于 2019-12-04 07:43:37
问题 I am trying to get started in Visual Studio (2010) extensions and I am having a hard time finding the right materials. I have the SDK, but the included samples seem to be things like adorners, windows, and icons. I am trying to make an extension that will work directly with the text editor (to alphabetize all of my method names in a class, or make all constant names upper case for example) but I can't find a demo for this type of functionality, or even a tutorial. Does anyone know where I can

Adding SubMenu to Visual Studio Project Item Node

a 夏天 提交于 2019-12-04 03:37:59
How can I add a menu and sub menu items when right click on a file item visual studio solution explorer? I have one menu and three sub menu items which will be displayed when I right click on a file in solution explorer like the below picture. I tried using .vsct buttons but it will display on context menu and Iam unable to add sub menus Authoring VSCT files is somewhat tricky; what you´ll need is a combination of a menu and buttons. First of all you need to reference the IDM_VS_CTXT_ITEMNODE group in your VSCT file. <Group guid="guidCmdSet" id="grpIdMenuProjectItem" priority="0x0800"> <Parent

Create Visual Studio Theme Specific Syntax Highlighting

杀马特。学长 韩版系。学妹 提交于 2019-12-04 03:27:52
I would like to create a Syntax Highlighter in Visual Studio 2012 (and above) that supports different themes (Dark, Light, Blue). Visual Studio's Editor Classifier project template explains how to create your own colors in the environment using Microsoft.VisualStudio.Text.Classification.ClassificationFormatDefinition . It works fine... ... until you realize that there are different themes in Visual Studio 2012 (and above) and you don't really support them. Your pretty dark blue colored identifiers on the light theme becomes unreadable in a dark themed environment. To my understanding if you

How to get Current ActiveDocument in Visual Studio Extension using MEF?

萝らか妹 提交于 2019-12-04 01:40:56
问题 I'm working on Visual Studio 2013 Extension using MEF while trying to read Active Document Content Type and Code. Presently it only reads at Opening Time of the Document/ProjectItem in the Editor. Once these are opened, it doesn't read these again whenever we switch between opened Document Tabs. Requirement: I want this extension to read the Content Type and Code Text of current Active Document. Updated: Problem: I know, using EnvDTE80.DTE2.ActiveWindow, I can get currently focused document,

Install-Package : The remote name could not be resolved: 'packages.nuget.org' [closed]

让人想犯罪 __ 提交于 2019-12-04 00:18:30
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center . Closed 7 years ago . For no reason, I have been getting this error message for a week or so; PM> Install-Package Elmah Install-Package : The remote name could not be resolved: 'packages.nuget.org' At line:1 char:16 + Install-Package <<<< Elmah + CategoryInfo : NotSpecified: (

Uninstall Microsoft ASP.NET and Web Tools

霸气de小男生 提交于 2019-12-03 20:12:57
I think this extension is causing a problem in my Visual Studio 2015 Update 2 but I can't uninstall it. Under Extensions, it's listed but Remove/Disable buttons are grayed out. I can't find it under Remove Programs/Features either. How in the world can I uninstall this extension? qxg Uninstall via its installer: Download the latest Microsoft ASP.NET and Web Tools installer Run the installer normally. Run the installer again and click the uninstall button. 来源: https://stackoverflow.com/questions/37825906/uninstall-microsoft-asp-net-and-web-tools

Getting the current EnvDTE or IServiceProvider when NOT coding an Addin

放肆的年华 提交于 2019-12-03 17:03:21
问题 I am coding up some design time code. I want to use this snippet: (Found here) var dte = (EnvDTE.DTE) GetService(typeof(EnvDTE.DTE)); if (dte != null) { var solution = dte.Solution; if (solution != null) { string baseDir = Path.GetDirectoryName(solution.FullName); } } Problem is that this does not compile. (GetService is not a known method call) I tried adding Microsoft.VisualStudio.Shell (and Microsoft.VisualStudio.Shell.10.0) but it did not help. In looking around on the internet I found