vsx

Evaluating expressions using Visual Studio 2005 SDK rather than automation's Debugger::GetExpression

一世执手 提交于 2020-01-23 04:19:56
问题 I'm looking into writing an addin (or package, if necessary) for Visual Studio 2005 that needs watch window type functionality -- evaluation of expressions and examination of the types. The automation facilities provide Debugger::GetExpression , which is useful enough, but the information provided is a bit crude. From looking through the docs, it sounds like an IDebugExpressionContext2 would be more useful. With one of these it looks as if I can get more information from an expression --

How to get a programmable interface to the Visual Studio Call Stack window?

青春壹個敷衍的年華 提交于 2020-01-23 02:56:19
问题 I am working on a Visual Studio add-in (part of the ILSpy open source project) and I want to get information about the currently selected stack frame in the Visual Studio Call Stack window. I tried this: var callstackWindow = ((EnvDTE80.DTE2)GetGlobalService(typeof(EnvDTE.DTE))).ToolWindows.GetToolWindow("Call Stack"); However it throws an exception when not debugging (and Call Stack window not present) and returns null when the Call Stack window is present. There is a vsWindowTypeCallStack

What goes in the “Non-Public members” node in Visual Studio's Watch window?

我的梦境 提交于 2020-01-13 18:01:28
问题 I assumed that all Non-Public (ie, private, protected, internal, and internal protected) members of C# objects go under " Non-Public Members " when I look at objects in Visual Studio's Watch Window. But then, I noticed an anamoly with this code: class HashDerived : System.Security.Cryptography.HashAlgorithm { ... } HashAlgorithm hash1 = new HashDerived(); HashAlgorithm hash2 = new System.Security.Cryptography.SHA1Cng(); hash1 's "Non-Public Members" looks like this: whereas hash2 's "Non

EnvDTE partial class keyword

牧云@^-^@ 提交于 2020-01-05 06:37:27
问题 I'm introspecting on the code in a project using EnvDTE, and I want to be able to determine if they're a partial class, but it doesn't seem to exist in the namespace. Does anyone know how to do this? 回答1: This should help you out if(codeClass.ClassKind == vsCMClassKind.vsCMClassKindPartialClass) { // It is a partial class } 回答2: You can use the C# code model. Check this msdn article 来源: https://stackoverflow.com/questions/2144588/envdte-partial-class-keyword

Developing multiple Visual Studio 2010 extensions

浪尽此生 提交于 2020-01-03 19:42:06
问题 Im working on a couple of independent Visual Studio extensions in separate solutions. When I open one of them and launch the experimental instance in the debugger, the other extensions from the other solutions (which aren't open) are loaded as well. There must be a way to only launch one extension in the experimental instance at a time (in particular the one you're currently working on), right? 回答1: Not really. When you build and run the extension project in VS, it is actually deployed to the

How to register key binding code on VSIX package installation

耗尽温柔 提交于 2020-01-02 07:46:10
问题 I'd like to add keyboard shortcut to Visual Studio package only once, during its installation. Basically I know how to do it from the package code, for example: var dte = GetGlobalService(typeof(DTE)) as DTE2; if (dte != null) { dte.Commands.Item("Tools.Something").Bindings = "Global::Ctrl+T, Ctrl+S"; } The problem is, I'd like to invoke this code only once (I don't want to execute this code in package class constructor, because it will execute each time the package will be used first time

VSIX Package doesn't include referenced project's dependencies

久未见 提交于 2019-12-30 04:56:07
问题 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.

e.data.GetData is always null

情到浓时终转凉″ 提交于 2019-12-24 00:25:00
问题 I am working with Visual Studio 2010, developing an Extension I need to drag and drop from a WPF TreeView in a Toolwindow onto a DSL Diagram but when I call e.data.GetData I can not get a value and want to know what I am doing wrong private void OnDragDrop(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(typeof(SqlServerTable))) { try { SqlServerTable table = (SqlServerTable)e.Data.GetData(typeof(SqlServerTable)); MessageBox.Show(table.Name); } catch (Exception ex) { MessageBox

Can I create a Visual Studio 2010 Add-In that Uses a WPF Display?

若如初见. 提交于 2019-12-23 13:26:29
问题 We're working on creating a specialized graphical editor for our enterprise applications. We've looked at and rejected DSLs. Ideally I'd like to have the main interface of the editor be docked like the code windows and use WPF for drawing. Can anyone point me to some documentation to get me on the right path? Thanks. Colin. UPDATE: It's beginning to look like "no." From http://msdn.microsoft.com/en-us/library/bb166228.aspx: "Document windows are created by implementing an editor. The

How to notify the editor about document changes

和自甴很熟 提交于 2019-12-23 05:25:07
问题 I work on a custom project system and I have an issue with renaming items. The project system implementation is based on MPF and renaming items via the solution explorer worked more or less without any problems, but... When an item gets renamed, I also update information which are stored in the file itself. In case the document is opened by the code editor, the text in the editor doesn´t get refreshed (only the document window´s caption changes to the new filename). If I save the open