I'm writing a Visual Studio editor extension using the VS 2010 SDK RC. I'd like to be able to figure out what the references of the current project are. How do I get access to the project corresponding to the current editor?
The documentation on editor extensions doesn't seem to include information on how to access non-editor parts of...
This is done manually by going to the "Error List" output window and double-clicking on the first error or pressing F8. Is there a way to automate this?
(I'm using C++ if that matters.)
...
I'm writing an addin for Visual Studio 2008. At some point in my code, I'm attempting to access the current active configuration for a project:
var configName = _Project.ConfigurationManager.ActiveConfiguration.ConfigurationName;
Sometimes, in some very obscure cases, the getter for ActiveConfiguration throws an ArgumentException. Not...
I developped a Visual Studio 2008 package that adds some menu/commands to the IDE.
I have settings related to this package that I would like to save for each VS project where I use the package.
How do I get the current selected project (assuming I have either a solution with several projects) using DTE2 methods.
How do I programmatica...
System.Reflection.Assembly.Load(System.IO.File.ReadAllBytes(path))
So this is a work around to not being able to use T4 to reflect or read other files in the project or solution without locking the binaries from this post. The comments imply a memory issue.
The comments talk about a no-unloading downside, would this be garbage collect...
For example, if I change the signature in a function in either the header or the cpp, I'd like it to automatically change in the other one. If I add a new function in either, it should appear in both. If I delete a function, it could probably comment out the other one.
Manually having to duplicate one's changes seems silly.
Some people ...
We are looking to turn an internal tool we have developed into a Visual Studio Package that we would sell to other developers. The tool will impact the custom editor and/or custom languages.
Visual Studio 2010 has redesigned the API's heavily to simplify much of the work involved for these types of integration but the key question we hav...
We found a bug in Web Service Software Factory a description can be found here. There has been no updates on it so we decided to download the code and fix it ourself. Very simple bug and we patched it with maybe 3 lines of code. However* we have now tried to repackage it and use it and are finding that this is seemingly an impossible ...
I have created the following vsct file xml.
<?xml version="1.0" encoding="utf-8"?>
<CommandTable xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Extern href="stdidcmd.h"/>
<Extern href="vsshlids.h"/>
<Extern href="msobtnid.h"/>
<Commands package="...
Using the new Visual Studio 2010 SDK developing against the MEF based editor structure there's a question:
How can I use the MEF editor interfaces to handle snippet behavior in IntelliSense? The ICompletionSession itself is not a problem (e.g. get the available snippets) rather filling the snippet, handling the subsequently expected act...
In a Visual Studio Add-In, I'm enumerating over the members of a class in the current source file. When I encounter a property (e.g. CodeElement.Kind == vsCMElement.vsCMElementProperty) I cast that CodeElement to a CodeProperty and I can see the property's name and type.
What I'm having a problem with is getting a list of the propert...
Creating extensions got much easier with Vs2010, but this seems not to be the case for everything...
My aim: I wnat to make method calls and property uses of STATIC classes ITALIC. (Just like Eclipse and Java)
I think I need to talk to the C# Language Service for this information, but searching for "Language Service" just yields result...
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 suppr...
Allegedly, Visual C++ 2010 Express, unlike previous versions, supports third party extensions. I just downloaded the release candidate SDK for Visual Studio 2010, but the installer fails saying that I don't have Visual Studio installed (which is true since i use Visual C++ 2010 Express). Have I missed something? Is there a version of th...
Is is possible to do the following from a Visual Studio 2010 plugin? If yes, how?
Run all unittests in solution (with code coverage enabled)
Wait for all tests to complete
For successfully completed tests: Determine which methods were called during each test (directly by the test or indirectly by the tested methods). And store their na...
I've got an idea for a nice WPF designer extension, but I can't find any information on how to interact with the WPF designer via an extension. Lots of info about the text editor, but none about the WPF designer.
Important note: I'm looking to do this through an extension, like you'd download from the Visual Studio Gallery, rather tha...
I have an open source VSPackage that I would like to release with support for Visual Studio 2005, Visual Studio 2008, and Visual Studio 2010. I'm trying to figure out how to create the installer and how to perform the package registration with each edition of Visual Studio.
The deployment research I've done indicates my best bet for an...
I've got a designer that relies on the existence of other solution items. If one of those items is deleted the designer crashes and you have to edit as XML to fix. Not exactly user friendly.
I do, however, have the DTE object representing the instance of Visual Studio, as well as the ProjectItems I am dependent on.
Is it possible to,...
When we write the name of a method that doesn't exist, Visual Studio 2010 asks us if we'd like to generate a method stub with that name. What I'd like to know if is it possible to replace that same code stub generating command with one made by myself. I never did any kind of extensibility programming for Visual Studio so I have a couple ...
I'm making some experiments with Visual Studio's CodeModel. I tried creating a file with two namespaces in there through VS's Code Model:
CodeModel codeModel = projItem.ContainingProject.CodeModel;
codeModel.AddNamespace("Namespaces.FirstNamespace", "namespacestest.cs");
codeModel.AddNamespace("Namespaces.SecondNamespace", "namespaceste...