Jesse Carter
Jesse Carter

Reputation: 21207

Strange Visual Studio Behavior

my computer started doing something strange the other day and its seriously annoying. I haven't made any changes to the system but for some reason now when I double click on a visual studio solution file, it won't open. The only way I am able to open projects is to open the program and then go to file -> open and navigate to the solution.

Also, I have the program pinned to my taskbar (Windows 7) and I have it set to run as administrator but whenever I click on the button it still asks me if I want to allow the program to make changes to my computer. Any thoughts on how I can get things back and running the way they used to?

Upvotes: 4

Views: 798

Answers (2)

Wolf5370
Wolf5370

Reputation: 1374

You have probably lost the file association. Right click on a solution file and click open with and then select VS2010 from the list and ensure the checkbox is ticked to make it the default.

As to opening VS2010 as Admin I use a trick (read it somewhere, but can't remember where).

I have a separate admin Icon on my desktop (etc) with the following:

C:\Windows\System32\schtasks.exe /run /tn "VS2010 - Admin"

Then in Task Scheduler I have a task:

Name: VS2010 - Admin
Location: \
Desc: Runs VS2010 with Admin privileges
Action: Start a Program
Run with Highest Priveleges checked
Program: "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe"
Allow to be run on demand

Then when you run the icon, it will trigger the schedule which will launch VS as admin :D

Upvotes: 1

Eric Herlitz
Eric Herlitz

Reputation: 26307

  1. Turn off UAC
  2. Test
  3. The solution can be to change the Microsoft Visual Studio Version Selector to run as an admin. To do so navigate to %ProgramFiles%\Common Files\Microsoft Shared\MSEnv or %ProgramFiles(x86)%\Common Files\Microsoft Shared\MSEnv (64-bit), right click on VSLauncher.exe and select Properties. Go to the Compatibility tab and check “Run this program as an Administrator”.
  4. Test
  5. If the above didn't work try to also remove remove the contents of C:\Users\UserName\AppData\Roaming\Microsoft\VisualStudio\10.0. If you have any precious settings backup the folder before deleting it.

Upvotes: 2

Related Questions