I'm looking how to inject my own page into VS2010 Tools->Options window in my open source project. ReSharper, VisualSVN and others are able to add their own page there and it seems like a natural place for settings. Unfortunately I'm not able to find any information or examples and I'm not perfectly familiar with the extension framework (been able so far to add my own tool windows, toolbars, menus etc.)
Any help would be appreciated.
Update: I've just got NuGet source code because they inject tool window too, trying to figure out how.
Check out the Visual Studio Extensibility samples on MSDN Code Gallery. Specifically, you'd be most interested in these:
VSSDK IDE Sample: Options Page
VSSDK IDE Sample: WPF Tool Window
You can find general information on getting started with the Visual Studio SDK here: http://msdn.com/vsx
Related
I have a c# WPF application which is able to switch in deferent language as per customer wants. I also created a setup project for the same. I need to make the setup project also be able to switch language.
The problem is, the 'Visual studio installer project' doesn't have an option to do that. There is an option to set language for MSI. However dynamically changing the language is not supported
I have already googled it and no solution found.
some of the similar posts links are below. which also have no correct answer
c# Setup Project Localization
How to create preview choosing setup language in Visual Studio Project Installer?
Any idea how to do that. Thanks in advance
I don't have much experience regarding this, but:
The Wix installer seems to have support for localization:
https://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/
VDProject seems to be the right way to move forward aswell:
https://devblogs.microsoft.com/buckh/visual-studio-setup-projects-vdproj-will-not-ship-with-future-versions-of-vs/
I created a simple C# WPF application (executable) and I cannot seem to get into the linker options. I copied a screenshot from the internet:
I want to see this window in my application but I can't find it anywhere. I know I have been in this kind of window before, I forgot how I got there and I've spend an hour now to find it and I'm going nuts. I read everywhere that I have to select my project (not solution) and then go to properties. However, it takes me here:
Can anybody explain to me in extreme detail how I get to the linker properties? I use Visual Studio 2015.
You're mixing up C++ annd C#.
Your first screenshot shows a C++ project, and your second screenshot shows a C# project.
C# doesn't let you manually configure linker options.
In Visual Studio (2013/2015/2017), the Document Outline window for C# files is always empty ("There are no items to show for the selected document.").
It seems that this functionality is not (not yet / no more) implemented.
But then, how do I view the structure of the file? Is there any extension which implements this functionality?
showing only the selected/opened file
show regions
move/rename members
show documentation
Using the Solution Explorer and Class View are NOT the solution.
In the old Visual Studio 2003, I did use a self written Add-In, because it was easy to read the structure. (There were also other tools but I cannot find them anymore). So I ask here which solution you know. :-)
EDIT: Similar question also found:
How to show code outline in Visual Studio?
UPDATE: After 10 years the feature has finally arrived in VS 2022
This feature has been added in Visual Studio 2022 17.4.0:
You can now easily view a file’s structure at a glance in the Document Outline window. The Document Outline window displays the symbol tree of the file in the editor helping you quickly navigate and edit project files. You can open Document Outline by going to View > Other Windows > Document Outline or by using the shortcut Ctrl+Alt+T.
Update: This feature was disabled in v17.4.4 for the following reason:
After we released 17.4, we found some significant performance problems with the C# implementation of Document Outline that we didn’t catch during preview usage. We’ve temporarily disabled the feature, and are spending more time working on it to address these issues. These changes are larger than we’d usually like to include in a revision release, and need more bake time, so 17.4.3 [sic] onwards & 17.5 will both ship with the feature disabled. I know this is disappointing, but we have it back in no time and enabled in a future VS update.
There is also CodeMaid which provides the same functionality as JetBrains Resharper, but is free.
The best solution I found at present is:
JetBrains ReSharper (v8.0+) has a File Structure window which shows the structure of the current file as tree (types/members) and regions are also supported.
If you don´t have ReSharper, you can´t miss the Productivity Power Tools, made by Microsoft itself.
There's a specific version for each of Visual Studio versions. More info on these links:
VS2013
VS2012
VS2010
They have a feature called Solution Navigator
Also, there's this one that seems very interesting for bring alot of cool customizations to Visual Studio IDE, called VSCommands. It's worth to checkout their website => http://vscommands.squaredinfinity.com/features
It helps you look at the nested structure of certain types of files, e.g. windows forms designer file, open a form designer you should see all controls on the form shown in nested structure in the document outline window.
I need to achieve some kind of extensibility for a custom project template.
Having a C# code file opened, if...:
...current project has some specific type id.
...code file is a class and inherits some concrete base class.
...user pressed F5.
...I'd like to...:
...start an arbitrary program (a console application).
...attach Visual Studio to the process of the arbitrary program.
...debug.
Actually I'm absolutely lost and I don't know how to do so. I know I need Visual Studio 2010 SDK, but I don't know how to create an extension doing what I need to achieve.
Thank you in advance.
UPDATE
I'm doing some research in Stackoverflow Q&A and I'll be adding questions related to my own one:
Visual Studio 2010 Extensibility - Override Build Action without effecting cproj file
"Attach to Process" as a post-build event (This seems fine, but I don't like the approach. I prefer a full Visual Studio integration. Anyway, it gives a hint).
I guess the best way to try is VS addin that will catch the Run (F5) command and handle it as you wish. See this article as a starting point for catching command from VS addin: How to: Add and Handle Commands. And these for attaching to process from VS addin Attach to process for lazies and Visual Studio Add-In To Automatically Attach to Development Server
Hope that helps to find a solution for your needs.
Do you consider the use of third-party extensions, for example, the free DXCore Visual Studio Extensibility Framework? It can do what you need.
First of all, thank you everyone for the info, it has been useful.
Basically I got the way to do what I'm looking to achieve.
Because I want to assist others in a similar situation, I'd like to share what I'm using to solve everything:
NRefactory as C# code parser. It works like a charm! You can get a lot of info from a code file.
VSPackage Visual Studio 2010 SDK project template.
In order to attach to a process I'm going to look forward for Dmitry Pavlov's suggestions.
Interesting links:
VSPackage how-to: http://msdn.microsoft.com/en-us/library/bb164715.aspx
As soon as I got everything working, I'm going to edit this answer and give more detailed info.
I need to create a custom menu item for Visual Studio 2010 Add-in in C#, but I have had no luck in finding a solution for my needs.
I am aware that there was a similar post (Visual Studio Add-In - adding a context menu item to solution-explorer), but it did not help, as the blog follows the process through the integration package, and the video is done through VB. I had attempted to convert the VB syntax to the C# syntax, but about half way through the video, the Add-in methods has significantly changed from 2005 to 2010, as some of the methods have removed or changed.
Is there any good tutorials on making a custom menu item on the Solution Explorer in the lastest Visual Studio in C#, and is there a good website that could be used as a reference for looking over the VS add-in API? I've used Microsoft's main website, however it is confusing and wordy, which is difficult to understand and find the methods, properties, or commands that I am looking for.
Any help would be appreicated, Thanks in advance.
what are you writing? a number of cool add-ons already exist that might solve your problem..
such as vs 2010 Pro Power Tools
I don't know anything about it but you might want to check out MME MenuManagerTemplate and the sister project on CodePlex Managed Menu Extensions
Looks like the majority of the code is in the project on CodePlex so you could see how that project is implemented.