Quick tip on Visual Studio 2008 and UAC

On a Windows Vista (and presumably Windows Server 2008) that has User Account Control (UAC) enabled you are no longer able to drag and drop files from Windows Explorer into your VS solution. I always used this to quickly add files to a project. What a bummer.

There are 2 workarounds:

  1. Copy or move the files to the correct location in your Visual Studio project folder. Then go into Visual Studio and click the Show All Files button for that project.

    image

    You might need to click Refresh (not F5) on the project for the new file(s) to show up. Select them all and right-click. Choose Include In Project from the context menu.

    image

    -or-
  2. Instead of dragging the files simply copy and paste them into your project.

    image

    Sounds too easy for this to work, but it does.

Option 2 certainly makes it easier and faster for me.

Comments

# Davy Landman said:

Hi Alex,

I haven't run into this problem, but I normally use the first functionality.

But shouldn't copy and pasting still work, as long as you have the same elevation? (and same architecture off course, 32bit and 64bit processes can't copy and paste to each other..)

The second one is cool I must admit :)

maandag 16 februari 2009 15:13
# Alex Thissen said:

Hi Davy,

Thanks for the feedback. I found that I usually have non-elevated Windows Explorer instances which stop me from drag-dropping. Didn't know about the 32 vs. 64 bit-ness though. It should help there as well.

dinsdag 17 februari 2009 8:03