DEV Community

Owain Williams
Owain Williams

Posted on • Originally published at owain.codes on

Restart Visual Studio as Admin in seconds

blogcomputerimagelrg

Last week @HotChilliCode aka Nik shared this Scott Hanselman video with me : "Overwhelmed with Programming? Here's small things to help - Computer Stuff They Didn't Teach You #14"

During the video Scott talks about finding ways to reduce repetition. If you find yourself doing something over and over again, is there a way to speed it up? Can you automate it in some way.

Well today I found myself, for probably the 100th day in a row, needing to attach my debugger in Visual Studio to my local IIS instance. The only issue was, I wasn't running in Admin mode.

I needed to close visual studio, right click the icon, open as Admin then reload my solution. Not a massive issue but I had noticed I've been doing this a lot recently as Visual Studio for me doesn't automatically run in Admin mode. I know, I could set it up to run in Admin mode straight away but then if I am doing screen shares, the person I'm sharing with can't interact with my VS screen so then I need to shutdown VS, remove the setting to start as Admin. It's just a pain.

Anyway, I found an Visual Studio Extension called Visual Studio Restart and all it does is, it adds a Link in your File menu that will shutdown VS, restart it in Admin mode and also reload the solution you are working on. Brilliant!

Note: I am using VS2019 Community Edition, I've not tested this in any other versions.

The next thing I did was I assigned a shortcut key to the restart command. The key combo I used is Ctrl+ '

So now, if I am working on a project that I haven't loaded as Admin, I tap Ctrl + ' and boom, I'm up and running in Admin mode in seconds.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay