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 7753403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:03:22+00:00 2026-06-01T12:03:22+00:00

I would like to run a script after files with certain extensions are saved

  • 0

I would like to run a script after files with certain extensions are saved in visual studio. I am wondering where the event handler for saving a file is located in the Visual Studio SDK API.

Can anyone point me in the right direction in terms of API documentation for visual studio extensions. I have found the Visual Studio SDK Reference but some direction or sample examples would be helpful.

I want to create partial designer files that are usually generated when the project is built (Mono for Android Project), my files will have temporary values, but are only intended to enable intellisense without building the entire project. I can run the process manually right now, but I would like to trigger the script when .xml or .axml files are saved.

It think I need to work with IVsRunningDocTableEvents.OnAfterSave method, but I’m not sure about how I get the handle on the running doc table, or how I filter the files I want to run the event for. This is my first attempt at using the Visual Studio SDK.

  • 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-06-01T12:03:24+00:00Added an answer on June 1, 2026 at 12:03 pm

    The event handler for saving files is:

    Dte.Events.DocumentEvents.DocumentSaved

    Note you need to keep a reference to Events and DocumentEvents in order for it to actually work. Here is some information on that: http://social.msdn.microsoft.com/Forums/br/vsx/thread/0857a868-e650-42ed-b9cc-2975dc46e994

    Here is a link to 30 sample projects that illustrate all kinds of functionality for Visual Studio Add-Ins:

    http://code.msdn.microsoft.com/Visual-Studio-2010-SDK-ddfe1372

    You can find some getting started informatin here:

    http://msdn.microsoft.com/en-us/vstudio/ff677564.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to suppress output in R when I run my R script
I would like to create a ruby script that I can run mysql commands
I would like to be able to run a nose test script which accepts
Do PowerShell scripts run under Mono? I would like to run them on a
I would like to run the following SQL select: SELECT ID, NUMERATOR, (SELECT m.COLUMNNAME
I would like to run APIDemos under platforms\android-1.5\samples directory on Android emulator but I
I would like to run a (extensive) query that produces one line of XML.
I would like to run a timer for every 5 hours and delete the
I would like to run a process from Python (2.4/2.5/2.6) using Popen , and
I want to run my program on all the files in a directory after

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.