visual-studio-extensions

How can I match Visual Studio's theme when creating a VSIX tool window?

流过昼夜 提交于 2019-12-03 16:04:19
I am creating an extension for Visual Studio (2012+) that involves a tool window. I was hoping to style the window identically to match the current theme of Visual Studio. However, I am having a great deal of trouble figuring out how to do it. This post suggests that applying no style at all is all that is required, but that does not match my experience thus far (even creating a default VSIX project in VS2017 and adding a tool window shows a button that I would argue is standard WPF in theme and not VS themed, at least when using the dark VS theme in VS2017). This post asked a similar question

Registering an unpacked VSIX extension via MSI without using devenv /setup

∥☆過路亽.° 提交于 2019-12-03 14:52:31
问题 We have a Visual Studio extension, currently installed with MSI, since we need to perform certain tasks after the installation (ngen, registering certain COM servers, etc). In the end of the installation, we run devenv.exe /setup (more specifically, devenv.exe /setup /nosetupvstemplates to make it a bit faster) to register the extension in Visual Studio 2012 and above (in 2010 this step was not required, since VS2010 would rebuild the extensions cache on every startup). We're currently

How can I find out when Visual Studio theme color changes?

眉间皱痕 提交于 2019-12-03 13:29:14
I develop the Visual Studio package with a tool window. The UI of the tool window is based on WPF. In my user control I want to use current Visual Studio theme colors corresponding to the VS design. Therefore my question is how I can find out that Visual Studio theme color has been changed? Thanks in advance. I've found another way to do it. I can use visual studio theme colors resources from xaml directly. For example: Background="{DynamicResource {x:Static vsfx:VsBrushes.ToolWindowBackgroundKey}}" where vsfx is xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft

Visual Studio Productivity Power Tools configuration settings

蓝咒 提交于 2019-12-03 11:31:05
问题 I'm trying to figure out where the Visual Studio Productivity Power Tools settings are stored. I recently moved to a new instance of visual studio and I've lost all of my Power Tools regex tab coloring settings. They are clearly not part of the normal VS2010 settings file, as I exported and imported this already. Any help would be great! 回答1: It's just stored in the registry under HKCU\Software\Microsoft\VisualStudio\10.0 It seems the regexes are under ...\DialogPage\Microsoft.DocWellBehavior

Regular Expression to match folder name with Productivity Power Tools Color Coding

痞子三分冷 提交于 2019-12-03 11:30:06
I would like to configure a RexEx to match any folder (parent or child) of a file path of any open file. So if any folder in the file path contains the name of the open file, the color coding of the tab is set based on the RegEx match. For example: websiteRoot/Content/MyName1/site.css = green colored tab when file opened websiteRoot/Content/MyName2/site.css = orange colored tab when file opened websiste/Shared/MasterPages/MyName1/main.master = green colored tab when file opened websiste/Shared/MasterPages/MyName2/main.master = orange colored tab when file opened I have tried: .*MyName1?$ but

Sync Extensions in Visual Studio 2013 between multiple machines

这一生的挚爱 提交于 2019-12-03 10:58:25
问题 I'm sure this is a common problem, but I can't find much info about it. Problem I have a work computer, a home computer, a surface, and maybe some Azure VMs that i'd like my visual studio 2013 extensions synced across them. I seem to have to refresh/wipe a computer fairly often, and re-installing all the extensions I like to use is sort of a pain. I initally thought the new VS Profiles would do this, but apparently they only sync themes/general settings. Attempted/Outdated Solutions There

Visual Studio 2012 is unresponsive at start with hidden error messages (two dings at start)

核能气质少年 提交于 2019-12-03 09:47:50
After latest update of Azure tools, Visual Studio 2012 does not work correctly. Looks like an unresponsive application, loading project very long, menu does not work too and you can hear two dings at start (like error message boxes, but there is no visible messages). In the some cases you can see the real message about "The HDIProjectPackage did not load correctly". At the same time Visual Studio 2013 is not affected. You can launch Visual Studio 2012 in the safe mode: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>devenv.exe /SafeMode and it will work well. While launching

How to create and install test adapter in Visual Studio

雨燕双飞 提交于 2019-12-03 09:02:56
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 install it. (with UnitTestExtension as Asset) I have tried to download Marcel's project ( https://github

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

≯℡__Kan透↙ 提交于 2019-12-03 08:52:47
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(dllStream, pdbStream); if (!result.Success) { IEnumerable<Diagnostic> failures = result.Diagnostics.Where

Cannot run VSPackage when developing on multiple machines

被刻印的时光 ゝ 提交于 2019-12-03 07:15:01
问题 we are working on a VSPackage in a team, using Visual Studio 2012 and TFS. The extension works fine on the computer used to create it (through a wizard). On another computer, Visual Studio says that "a project with output type of class library cannot be started directly" when we attempt to run it (with F5). The output of the project is indeed class library, and pressing F5 on the first machine starts Experimental Instance of Visual Studio with the extension loaded and working. By looking at "