FAQ Database Discussion Community


Install nuget package with a VSPackage

c#,nuget,vspackage,visual-studio-sdk
I'm trying to install a nuget package into a project that I am generating with a VSPackage. So far, I am able to create a solution from a project template: Solution4 soln = (Solution4)ApplicationObject.Solution; string prjPath = "C:\\MyProject"; string templatePath = soln.GetProjectTemplate(@"SomeProject\MyTemplate.vstemplate", "CSharp"); soln.AddFromTemplate(templatePath, prjPath, "New CSharp Project", false); But...

How can I obtain the list of files in a project from VSIX(/MPF) code?

visual-studio-extensions,vsix,vspackage,mpf
I am building a VSIX package to support a custom language in Visual Studio using MPF. I am in a custom designer and I need to find the files referenced in the project to resolve some dependencies. Where can I access this list?

Why I get the problems with Visual Studio “2013” SDK samples?

visual-studio,sdk,vspackage
Visual Studio 2013 Premium Update 4; Visual Studio 2013 SDK installed. I see the code sources are for older Visual Stuido version. It has a link to Visual Studio 2010 (instead of 2013) SDK Samples.zip file. I try compile its some projects but I get an exceptions... For example: Other...

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

c#,wpf,visual-studio,visual-studio-2013,vspackage
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.

Modifying project properties of custom project system in VisualStudio

visual-studio,visual-studio-extensions,vsix,vsx,vspackage
I have tried to create a custom project system by walk through https://msdn.microsoft.com/en-us/library/vstudio/cc512961.aspx and succeeded. And now I want to modify the project properties of this created project system. The second part of this walk through is guiding to create property pages for solution properties. (Solution Explorer-> Right Click on...

How to upgrade a 2013 vspackage to visual Studio 2015

visual-studio-2015,vspackage
I am trying to upgrade a vspackage to be used for visual studio 2015. The vspackage I created in visual studio 2013 and it works in all prior versions I Updated my dev box with Visual studio 2015. Install the Visual studio 2015 SDK. I upgrade the solution and all...

Change menu item string for VSPackage

c#,vspackage
I have a C# VSPackage project. It's a tool that helps with some stuff here in our office. It operates via a Tools menu item. I thought of a better name for the menu item, but how do I change it in the code? Every instance I've tried changing doesn't...

Obtain a PLK for a 2005/2008 VSPackage

vspackage,vs-extensibility
Our VS extension still needs to support VS 2005 and 2008, but I cannot generate a VSPackage PLK anymore - the system seems to be either broken or no longer supported by Microsoft. There is an MSDN page: How to: Obtain a PLK for a VSPackage, but steps described there...

Read and change project properties “Start external program” and “command line arguments”

c#,vspackage
I'm trying to read (and change) the project properties "Start external program" and "Command line arguments" of a VisualStudio 2013 project within a VSPackage. The code I wrote so far looks like: var dte = GetService(typeof(DTE)) as DTE2; if (dte == null) return; var sb = (SolutionBuild2)dte.Solution.SolutionBuild; var projectNames...

Get the path of the active document in Visual Studio

c#,visual-studio,visual-studio-2013,vspackage
I am writing a VSPackage for Visual Studio 2013 using C#. I need a simple menu to be added to the Visual Studio menu bar. When clicking it, I want the current open (active) document in Visual Studio to be uploaded on a specific repository. More Explanation: I want to...

File Watcher in VSPackage

file,detect,vspackage,changes
I'm new in developing in Visual Studio so I hope my problem is not too stupid :-) I try to establish a FileWatcher in my VSPackage to detect any changes performed in the current solution. For this I found the class FileWatcher, which - in my opinion - detect any...