vspackage

How do I programmatically add a file to a Solution?

元气小坏坏 提交于 2019-12-04 08:00:22
I am developing a VS Package and part of the functionality that I need to implement is to add a file to the Solution Items of the currently open Solution. This is exactly the same action that would be performed manually if you right-click on a Solution and choose Add > Existing Item. Then selected a file on disk. I have taken a good look at the DTE and DTE2 interfaces and can see the operations to add and manipulate projects but there doesn't appear to be any operations for adding individual files. Thanks. Ok, I realised I could just record a Macro to capture the operation then examine the

Method or operation not implemented error on Binding

百般思念 提交于 2019-12-04 04:01:41
I'm currently developing a Visual Studio plugin (VSPackage) which finally should be able to visualize call relations. In order to represent them I want to use the Graph# library which manages the graph (avoiding overlapping edges etc.). Unfortunately I get the following error message at runtime in my XAML: XamlParseException: The method or operation is not implemented. The error pops up on the <graph:CallRelationGraphLayout Graph="{Binding RelationGraph}"/> tag. <UserControl x:Class="Biocoder.InteractiveExploration.View.ExplorationControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml

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

Visual Debugger for Geometric Objects

纵饮孤独 提交于 2019-12-04 03:09:15
When working on my library representing geometric objects, Debugging currently looks like this: Here I am viewing the local variables in the Autos , Locals , Watch and Immediate windows. As I have trouble imagining the shape of the object in my mind, I would prefer a graphical component to represent these objects. So I have started creating a Debugger Visualizer to draw the objects. I have it in a public repo on bitbucket here . Right now I cannot get it to work outside of the Console Application I have in the solution with it. What am I doing wrong? here is what it looks like when it works:

How to add additional tool windows to a Visual Studio Extension?

痴心易碎 提交于 2019-12-03 22:51:46
问题 When creating an Extension for Visual Studio 2013 a tool window gets set up by default. However, I'd like to have a second tool window and can't see how one is supposed to go about that. 回答1: I have created a guide: HOWTO: Create a toolwindow with a ToolWindowPane class in a Visual Studio package http://www.visualstudioextensibility.com/2015/02/20/mz-tools-articles-series-howto-create-a-toolwindow-with-a-toolwindowpane-class-in-a-visual-studio-package/ 回答2: Well I just found a few things - so

VSIX package build failed without showing the reason (Visual Studio bug)

瘦欲@ 提交于 2019-12-03 17:28:46
问题 I have to enabled diagnostic mode of MSBuild project build output verbosity to see this: 1>Done executing task "EnableExtension" -- FAILED. (TaskId:81) 1>Done building target "DeployVsixExtensionFiles" in project "myextension.csproj" -- FAILED.: (TargetId:93) ... 1>Build FAILED. 1> 1>Time Elapsed 00:00:01.27 ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== My problem is I cannot debug the Visual Studio extension package I'm working on, as the build output says something has

How do you cancel a ToolWindowPane or Visual Studio IDE close operation via a VSPackage?

安稳与你 提交于 2019-12-03 17:07:56
I have a VSPackage with a dockable tool window containing form data. If there are unsaved changes in this form, I would like to cancel a close to either the tool window and the visual studio IDE if the user clicks cancel on saving changes before closing. I can perform the save test on close, but I don't see any event handler methods or other options to actually cancel the close. Here is some blurb from the package: private DTE2 _applicationObject = null; ///-------------------------------------------------------------------------------- /// <summary>This property gets the visual studio IDE

Suppress “No Source Available” pane in 2010

别来无恙 提交于 2019-12-03 12:18:52
Arg! I have a custom "harness" executable running my class library project. Every time I step into the harness's code, I get that "No Source Available" pane popping up. As I know there is no source available, and that this is completely expected, I don't want this very intrusive and useless pane popping up every time. How can I suppress it completely? I can make it smaller at least by making that window part of another smaller pane-set, such as with the watches/locals. It remembers its location from run to run, but its still useless. There might be a more general answer to this question - how

VSIX package build failed without showing the reason (Visual Studio bug)

谁说我不能喝 提交于 2019-12-03 07:19:42
I have to enabled diagnostic mode of MSBuild project build output verbosity to see this: 1>Done executing task "EnableExtension" -- FAILED. (TaskId:81) 1>Done building target "DeployVsixExtensionFiles" in project "myextension.csproj" -- FAILED.: (TargetId:93) ... 1>Build FAILED. 1> 1>Time Elapsed 00:00:01.27 ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== My problem is I cannot debug the Visual Studio extension package I'm working on, as the build output says something has failed. What's wired, the obj and bin folders with all content inside (including vsix package), has

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 "