Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 26th, 2012  |  syntax: None  |  size: 0.64 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. I've added this as a function in my NuGet PowerShell profile.
  2.  
  3. From the Package Manager Console:
  4.  
  5. PM> $profile  # echos path to NuGet_profile.ps1
  6.  
  7. Open that file in a text editor and add the following code:
  8.  
  9. function NoStartOnDebug(){
  10.         get-project -all | %{ $_.Properties | ?{ $_.Name -eq "WebApplication.StartWebServerOnDebug" } | %{ $_.Value = "False"} }
  11.         Write-Host "'Always Start When Debugging' has been disabled for all web projects."
  12. }
  13.  
  14. To reload your profile with the changes:
  15. PM> . $profile
  16.  
  17. To run the function:
  18. PM> nostartondebug
  19.  
  20. Of course you can use a shorter name. Even better would be if it automatically ran it when a solution was opened...