visual-studio-extensions

VS2015 VSIX System.OutOfMemoryException

时间秒杀一切 提交于 2019-12-10 21:03:48
问题 I created a new VSIX project and added a new item -> Extensibility -> Custom Tool Window Then I tried to build, but it gave an error: 1>------ Build started: Project: JSBQ, Configuration: Debug Any CPU ------ 1>E:\JSBQ\packages\Microsoft.VSSDK.BuildTools.14.2.25123\tools\VSSDK\Microsoft.VsSDK.Common.targets(126,5): error MSB4018: The "VSCTCompiler" task failed unexpectedly. 1>E:\JSBQ\packages\Microsoft.VSSDK.BuildTools.14.2.25123\tools\VSSDK\Microsoft.VsSDK.Common.targets(126,5): error

How to handle pressing any keys in the user control in visual studio vspackage

两盒软妹~` 提交于 2019-12-10 19:16:27
问题 I added usercontrol (textbox) in code editor control. But textbox not handle any keys (arrow, backspace). Keys handle code editor only. Example: get IWpfTextView var textManager = (IVsTextManager)Package.GetGlobalService(typeof(SVsTextManager)); IVsTextView textView; textManager.GetActiveView(1, null, out textView); var userData = (IVsUserData)textView; if (userData == null) return null; Guid guidWpfViewHost = Microsoft.VisualStudio.Editor.DefGuidList.guidIWpfTextViewHost; object host;

Add context menu to VS 2010 solution explorer (display item on solution only)

我的未来我决定 提交于 2019-12-10 18:59:31
问题 It is fairly easy to add a context menu item to the solution explorer in VS 2010. But how to display the menu item ONLY on solution items? Not on project items or something else? Best regards, D.R. 回答1: Use <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_SOLNNODE"/> and reset the experimental instance before restarting VSX (you can find the reset script in the VS start menu folder) 来源: https://stackoverflow.com/questions/7418038/add-context-menu-to-vs-2010-solution-explorer-display-item-on

Visual Studio Extension: Get the path of the current selected file in the Solution Explorer

泄露秘密 提交于 2019-12-10 18:55:31
问题 I'm trying to create my first extension for visual studio and so far I've been following this tutorial to get me started (http://www.diaryofaninja.com/blog/2014/02/18/who-said-building-visual-studio-extensions-was-hard). Now I have a custom menu item appearing when I click on a file in the solution explorer. What I need now for my small project is to get the path of the file selected in the solution explorer but I can't understand how can I do that. Any help? ---------------------------- EDIT

Log errors in visual studio extension

社会主义新天地 提交于 2019-12-10 18:25:58
问题 What is the right way for logging unexpected exceptions in Visual Studio extensions. Is there any classes in the Visual Studio SDK, or may be exist some libryries from partialy side developers? 回答1: There's the ActivityLog class which logs to the ActivityLog.xml file. That's about it. 来源: https://stackoverflow.com/questions/10010247/log-errors-in-visual-studio-extension

Bind Mouse Side Buttons to VisualStudio Actions

有些话、适合烂在心里 提交于 2019-12-10 17:17:34
问题 I try to redirect the XButton 1 and 2 (Side Buttons of the mouse) to specific Visual Studio actions. When I press the XButton1 I want to compile the project / build it. This action is bound to F6 by default. When I press the XButton2 I want to switch between code and design view (WinForms). This is bound to F7 . After several attempts using using Visual Studio built-in tools, I created the following script using AutoHotKey: XButton2:: IfWinActive Microsoft Visual Studio { Send {F7} return }

github extension for visual studio 2015 loses connection

痞子三分冷 提交于 2019-12-10 15:59:13
问题 I keep getting this error occasionally. It is really annoying because sometimes it fixes itself, but mostly I just have to close VS and reopen and then it will work again for a while. It happens when I try to pull from a branch (or any other git network interaction). Error encountered while fetching: An error occurred while sending the request. Inner Exception: The remote name could not be resolved: 'github.com' Sometimes it fixes itself after an unknown period of time. Sometimes I do nothing

Unable to find an entry point named '?' in DLL 'PkgdefMgmt.dll' on Visual Studio 2017 (VS 2017)

徘徊边缘 提交于 2019-12-10 15:08:05
问题 I'm getting the error: Unable to find an entry point named '?' in DLL 'PkgdefMgmt.dll' when installing a Visual Studio Extension (vsix) for VS 2017. This extension was developed in VS2015, so i thought i'd upgrade, recompile, and reinstall it, but I get the same error. This is a new laptop with Windows 10 and VS 2017. Any ideas to fix? Here's the complete install log: 5/9/2017 10:23:21 AM - Microsoft VSIX Installer 5/9/2017 10:23:21 AM - ------------------------------------------- 5/9/2017 10

Resetting Experimental instance of Visual Studio

隐身守侯 提交于 2019-12-10 13:33:37
问题 I am trying to develop extensions for Visual Studio and I am going through some articles. One key point of VS extension development is to reset experimental instance of Visual Studio, which I am having problem with. For example, here is written that I should use following command to reset it (it is recommended also in Microsoft docs): CreateExpInstance /Reset /VSInstance=12.0 /RootSuffix=Exp I run command line and navigate to CreateExpInstance location and run this command (I tried with

How do I list all the projects in the current solution using EnvDTE?

℡╲_俬逩灬. 提交于 2019-12-10 11:28:58
问题 I've been following MSDN's Hello World guide to developing Visual Studio extensions (this article specifically deals with creating one as a Visual Studio toolbar command). I am trying to list all projects contained in the current/active solution. In the auto generated code for the Command template. I have tried EnvDTE 's Solution 's Projects property, but it shows zero projects. There is a ActiveSolutionProjects property as well, but it also shows an empty array. How is this achieved ? P.S.: