Visual Studio, Azure development and where’s my project?

I’ve been running into this lately – not a showstopper, but something to keep in mind as you work with projects.

The components:

Visual Studio 2012 with Azure SDK 2.1 installed

Hosted TFS ( as ALM/Source control.

Windows 8.1 Pro – running as a standard user account separate from the machine Admin account.  LiveID is set up with Azure services, TFS, O365 so everything is synched.


The fun:

To do local debugging with Azure Services, Visual Studio must be run as administrator.  No problems there, I’m just breaking things out so all the accounts line up and keeping my projects on the right services.  So run Visual Studio as administrator, enter in the password and, since it’s a new box, “Open from Source Control.”  Put the project in the Visual Studio folder under Documents, code, debug, deploy, repeat.  Then go to just review the code, so simply run Visual Studio.   The project is now missing!   So what happened?

Exactly what you’d think would happen if you thought about the process as it went along.  The key factor is “Run as Administrator.”  This is a bit of an ambiguous statement as Administrator is a role AND an account.  What happens is that it seems you’re not merely running with Administrative rights but you’re actually running Visual Studio as the Administrator account you entered.  So the Documents folder you saved your project to is actually on another account – you can test by logging into that account and seeing all your code sitting there.  Makes perfect sense when you think about it, but sometimes when you’re looking for your code, that one step may not jump out at you.

Easy solution?  Elevate your dev account to Administrator rights.  Probably the right solution?  Change Visual Studio preferences to drop your code in a location where both the administrator account and your dev account can both access.