Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6612435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:05:53+00:00 2026-05-25T20:05:53+00:00

I want to write an extension for the Visual Studio 2010 editor, that replaces/edits

  • 0

I want to write an extension for the Visual Studio 2010 editor, that replaces/edits the selected text. I’ve figured out how to do this the “old way” by selecting a “Other Project Types – Extensibility – Add In”, but as far as I know, this is pretty much legacy, and includes alot of COM Interop and mess like that.

The samples I can find online for the new type of extensibility-project (“New Project – C# – Extensibility”) only manipulates stuff like colors and makes boxes around letters and useless stuff like that.

Can this be done with MEF and VSIX, or do I have to fall back to the legacy-method?

What I want to do:

  • Create an extension that adds a menu item (and maybe a toolbar button)
  • When the user clicks the button/menu item (or a assigned keyboard shortcut), the current selected text is changed according to the add-ins behavior.

I’ve managed to do this with legacy add-in, but it feels “wrong” working with so much interop, when the new MEF stuff is out there. Any samples, code examples, tutorials etc. is greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:05:54+00:00Added an answer on May 25, 2026 at 8:05 pm

    Legacy approach is to use Visual Studio Integration Package services, but now you can leverage power of the MEF Framework. Take a look here:

    • Extending the Editor
    • Managed Extensibility Framework in the Editor
    • Walkthrough: Highlighting Text
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write an Editor extension for Visual Studio 2010. In my extension
i want to write a visual studio extension to access redmine issues. how would
I want to write an extension for Google chrome that detects snippets of source
If you are a C# developer that uses Visual Studio 2010 Premium Edition and
I want to write a Chrome extension that intercepts some data that a Javascript-based
I want to create the webpart in Visual studio 2010/2008 environment with microsoft given
I am creating an extension for Visual Studio 2008, and because I didn't want
I want to write an extension method for the List class that takes an
I want to write a Google Chrome Extension that can take information from a
I want to write a test framework extension for resharper. The docs for this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.