visual-studio-addins

Adding a property page to project properties without implementing a project subtype

≯℡__Kan透↙ 提交于 2020-01-25 01:42:23
问题 I'm developing a Visual Studio 2010 package. My package needs to add a new tab to the project properties. All the examples that I could find on adding new tabs add the tabs by implementing project flavors or subtypes. However, I need to add the tab without creating a new project flavor. I know that this must somehow be possible, as other packages are doing it as well (for example, when you install Code Contracts, you get a new Code Contracts tab, and the Code Contracts package does not modify

Dead items in context menu left by addin in Visual Studio

一曲冷凌霜 提交于 2020-01-07 04:36:13
问题 We are developing addin for Visual Studio. It creates items in Solution Explorer context menu. The problem is when we remove the addin, menu item is still there but without icon. When I click on it, VS propose to remove the command. See screenshot. How should they be uninstalled to remove the command? At the moment I just remove the addin file from "Visual Studio 2012\Addins" folder during uninstall. I'm using class Connect : IDTExtensibility2 回答1: One option is to run a .vbs script on

Use Addin project in another application

岁酱吖の 提交于 2020-01-05 17:32:14
问题 I have created a addin application with which i'm creating a solution with some files programtically. I have to integrate this in another winforms application. So once the user clicks the button a new project is created with some inputs dynamically. In the addin project the form contains a method(OnConnection) which gets called automatically. This creates the project at run-time. The application works fine. public void OnConnection(object application, ext_ConnectMode connectMode, object

Visual studio addin - finding current solution folder path

烂漫一生 提交于 2019-12-30 08:23:13
问题 I have an add-in loaded, and a solution loaded, how would I find the folder path of that solution programmatically in C# in my addin? 回答1: Alas I figured it out after a lot of goooogling!! In connect.cs: public String SolutionPath() { return Path.GetDirectoryName(_applicationObject.Solution.FullName); } 回答2: The Solution.FullName answer is correct, but take care, you cannot access it until the OnStartupCompleted method is called in connect.cs. 回答3: you can use this code: string solutionpath =

Visual Studio Add-In - adding a context menu item to solution-explorer

纵饮孤独 提交于 2019-12-29 07:36:13
问题 I'm developing my first add-in for Visual studio and we need to add a context menu item to the solution explorer, that shows up for particular file types only (in our case - ".resx"). I've been googling for 2 days now, unable to find any tutorials or code-samples... Only very basic things like adding a menu-item to the VS "tools" menu etc. 回答1: Well, you need to create a dynamically visible command that you will make visible only when the selected node in the Solution Explorer is .resx file

ClickOnce Automatic Update error for VSTO- add-in for Excel

北战南征 提交于 2019-12-25 04:57:28
问题 I created a simple test program to try and understand how Click-Once deployment works and whether or not I can have the program automatically updated. It is an excel add-in with a button in the ribbon that outputs some message box. I have the deployment location set to a public location on the network and updates set to check every time the customization runs. Great - I install the add-in, open Excel, it works fine. Now I go into visual studio and update and re-publish the add-in. Now when I

VSIX extension adding assembly reference to project

五迷三道 提交于 2019-12-24 13:50:04
问题 Im building an extension that should be able to add an assembly to a projects references This assembly is included with the VSIX Is including the assembly with the VSIX a good idea ? How do I get the path to the assembly that was distributed with the VSIX ? 回答1: To get the deployment directory of your VSIX extension, you can use the following code: System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) Then just add your assembly name to this path. 来源:

How to search for the name of the UserProperty in Outlook.MailItems, not their value

梦想与她 提交于 2019-12-23 01:08:06
问题 BACKGROUND: Currently I am searching Outlook.MailItems where their UserProperty (here, "IsProcessed") is equal to its propertyValue (here, true or false). string propertyValue = "true"; string filter = "http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/IsProcessed LIKE \'%" + propertyValue + "%\'"; I am using this filter string in advancedSearch link to doc PROBLEM STATEMENT: My usecase is to search if these mailItems have any UserProperty assigned where name of