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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:44:28+00:00 2026-06-17T17:44:28+00:00

How do I run a rake script automatically every time I save a file

  • 0

How do I run a rake script automatically every time I save a file in Visual Studio? I can create a batch file that wraps the command. And I’d like to trigger it on CTRL + S. But, Visual Studio 2012 doesn’t have macros.

JP Boodhoo has done it in many of his screen casts, but hasn’t shared the implementation.


FYI, my rakefile looks like this

require 'albacore'

desc 'Build Solution'
msbuild :Build do |msb| 
  msb.properties :configuration => :Release 
  msb.targets :Clean, :Build 
  msb.solution = 'ProjoBot.sln' 
end 

desc 'Run Unit Tests' 
mspec :Test do |mspec| 
  mspec.command = 'Lib/Tools/MSpec/mspec-clr4.exe' 
  mspec.assemblies 'Src/Tests/ProjoBot.UnitSpecifications/bin/Release/ProjoBot.UnitSpecifications.dll'
end 

task :default => [:Build, :Test]
  • 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-17T17:44:29+00:00Added an answer on June 17, 2026 at 5:44 pm

    I used the External Tools to run a batch file that executes the default Rake task.

    @ECHO OFF
    rake
    

    I assigned the shortcut key CTRL + S to the tool, so that, when I save, the rake task is triggered! I hope this helps someone looking to do the same thing.

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

Sidebar

Related Questions

I've written a Rake script that should run automatically with Crontab. The script runs
When I run rake from within a batch file (.bat) it will exit immediately
I am trying to run a ruby script that parses a text file with
I want to run an executable from a ruby rake script, say foo.exe I
Since I migrated to Snow Leopard I can't run any Rake command from the
I have a shell script ( /home/user/send_report.sh ) that runs my rake task: cd
What's the best way to run scheduled tasks in a Rails environment? Script/runner? Rake?
Weird null error. I have a /lib/task rake script that refuses to set a
I have a rake task that connects to an ftp server, downloads a file,
I've currently created a custom rake file that does the following: 1.) Checks an

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.