Skip to content

Opening Visual Studio with Rake

Wed Aug 06 2014

There are probably several ways to do this, here’s how I did.

rakefile.rb:

ruby
DIR = File.dirname(__FILE__)
desc "Starts Visual Studio with the project solution."
task :vs do
 sln = "#{DIR}/src/project.sln".gsub! '/','\\'
 system( "start #{sln}" )
end

That’s it! From a cmd shell type “rake vs” and Visual Studio will start with the specified solution file.

💾 May the source be with you. v3.2.1118