vsx

How do I write to the Visual Studio Output Window in My Custom Tool?

I am writing a custom tool and I currently have it doing what I want as far as functionality. I would like to be able to write to Visual Studio if something goes wrong. (Incorrectly formatted code or whatever). Are there any standards for this? Right now I basically can force the tool to fail and Visual Studio puts in a warning that i...

MVC T4 MvcTextTemplateHost and Customized "Controller" T4 Template

I am creating my own custom T4 Template that integrates with an ADO.NET Entity Framework Model (.edmx file) included in my MVC Web Application. For Reference Please take a brief look at the following two URLs. Scott Hanselman - "T4 Code Generation Visual Studio Best Kept Secret" Visual Web Developer Team Blog - Quick Start Guide for ...

Event for Text Selection in VS2008

I am writing an addin for Visual Studio 2008. I need to know when some text (code) is selected in Text Editor. I have not been able to find any events for that. For example, when somebody selects some code using mouse or keyboard in the class file, how can I get notified that some text/code has been selected? Thanks in advance for your ...

Should a new Visual Studio-Based Application be based on 2008 or 2010?

I am thinking of creating a product based on the Visual Studio Shell (primarily isolated mode). Since Visual Studio 2010 will most likely be RTM before my product, does it make sense to start with VS2010 as a base rather than VS2008? Has anyone looked at what they changed in connection to the shell framework and if it is improved enou...

Is there an elegant way to make a EnvDTE.CodeProperty ReadOnly?

I need to switch my CodeProperty between read only and read / write. I can achive this with Edit points and ReplaceText so: if(readOnly) { CodeFunction setter = codeProperty.Setter; TextPoint start = setter.StartPoint; TextPoint end = setter.EndPoint; start.CreateEditPoint().ReplaceText(end, string.Empty, 0); } else { CodeFunction ...

New appdomains in a VisualStudio Addin

I have a visual studio (2008) addin which creates a new appdomain. Calling "CreateInstanceAndUnwrap" does not throw an exception (and the "AssemblyResolve" event does not fire), and I get an object. That object, however, is flawed. :) Calling "GetType" on it returns a "MarshalByRefObject", and not the concrete object I created. This does...

Visual Studio 2010 addin writing articles/tutorials?

Does anyone know of some good articles / tutorials on writing addins/plugins for Visual Studio 2010? ...

Including More Database Connection Options in a Visual Studio Isolated Shell Application?

When starting up an isolated mode visual studio shell application, the only databases available in the Tools->Connect to Database are Access, SQL Compact, and SQL Server Database File. Is there a way to configure the isolated shell to include other database types? In particular SQL Server and MySQL. Are there any licensing agreement...

Open a VS 2005 Solution File (.sln) into memory

I would like to open into memory an existing .sln file. Example of a non-working method: private Solution2 OpenSolution(string filePath) { Solution2 sln; sln.Open(filePath); return sln; } If I have an instance of Solution2 then i can call the method Open; but how can i get an instance of Solution2? My goal is then to get...

Can you process T4 templates from inside a .NET application?

Can you process T4 templates from inside a .NET application? Is that code available to be called? included in a project? licensing? update: so it does look like you would have to use VS in some way. ...

Visual Studio 2008 & Override LanguageService for Existing File Extension

Hi, I write simple LanguageService for JavaScript language. Target IDE is Visual Studio 2008. I want to run my LanguageService for .js extension file(default extension for JavaScript language). But for this extension my LanguageService don't working. When I run my LanguageService for extension .jsp(could be any extension don't supportin...

How do I create a Visual Studio add in to analyze code

I want to have a go at writing add ins for visual studio that can play around with the code like resharper does e.g. look at a line of code and then suggest which "using statements" need to be added. This is purely for educational purposes and a bit of fun, however I have no idea where to get started with the extensibility model. Can an...

Visual studio extensibility allows us to put extra items in any menu?

I mean, I have an add-in that will be applied to a given project. I'd like to know if it's possible to add a menu item for my add-in to the context menu that appears when you right click any project in the solution explorer. ...

Creating a Visual Studio Tool Window - VsAddin or VsPackage

Hey Folks. Simple question - I found two ways to add a tool window to Visual Studio (2008): create an addin or create a package. (Addin: http://www.codeproject.com/KB/dotnet/vstoolwindow.aspx) (Package: http://msdn.microsoft.com/en-us/library/bb165051.aspx) What's the "right" way? ...

Visual Studio addin - catch "SelectionChanged" (editor) event

Hey. I'm trying to catch all user text navigation events (selection changes) in the text editor to update a tool window (contextual to the current position). The "LineChanged" event under TextEditorEvents only fires on updates, and I did not manage to find any other event. Anyone knows of such? Arielr ...

Resolving problems with DSL SetUp project

I'm fighting with the InstallerDefinition.dslsetup file in a DSL setup project. I'm getting the following error: Running transformation: The setup project could not retrieve the output path for project 'PsiTraffic.Modeling.PomModel.Dsl' from the environment. Ensure that this project exists in the solution. Only Visual C# and Visual Basi...

Visual Studio SDK - Getting notified when a project item in your package's vsx project has undergone undo checkout?

We are working with Visual Studio SDK, creating a package. We need to get notified when a file (projectitem) gets undo checkout from TFS. Any solutions/pointers are appreciated. ...

How to access selected project in Solution Explorer from a Visual Studio Add-In?

I developed a VS 2008 add-in and added a custom menu item to context menu for "Project" nodes in Solution Explorer. This allows me to right-click any project in solution and perform a custom operation on that project. Or at least, it would, if I knew how to access the selected project from my Click event handler. Can someone with more ...

How to capture the mouse click event in VS2008 by ENVDTE?

I'm writing an add-on (by the format of VSPackage) for Visual Studio. One of the designed feature is: when user left-clicks in the area of text editor or presses up or down key to move to a new line, the add-on can capture this event and then do something (It's similar as the "VA Outline" feature in Visual Assist, when you clicks to a ne...

Creating a item template for Visual Studio 2008, with file-dependencies, is it possible?

I have a template that adds a new entry to the "Add->New item" right-click menu on a project in the solution explorer in Visual Studio. I have already built the template, put it into my ItemTemplates directory beneath my documents folder, and it works, in the sense that I can add new items to the project through the template. However, ...