Both Visual Studio and the Visual Studio SDK run under Windows Vista. You must install both with elevated administrative permissions. You must run Visual Studio as Administrator to compile samples and for many other scenarios. For more information, see Visual Studio on Windows Vista.
Installing Visual Studio
To run Visual Studio under Windows Vista, you must install Visual Studio 2005 Service Pack 1 (SP1) and Visual Studio 2005 Service Pack 1 Update for WindowsVista Beta. For more information, see Visual Studio 2005 Team Suite Service Pack 1. You must install both with elevated administrative permissions. If necessary, save Setup.exe to a temporary location and then run it as Administrator.
Installing the Visual Studio SDK
You must install the Visual Studio SDK with elevated administrative permissions. Visual Studio SDK will prompt you to elevate permissions when installation begins.
Running Visual Studio
You must run Visual Studio with elevated administrative permissions to compile the Visual Studio SDK samples and for many other scenarios. To enable the appropriate settings every time you start Visual Studio, you can create a shortcut on your desktop. To do this, create a shortcut to Visual Studio, right-click it, click Properties, click Advanced, and then select Run as administrator. You can do the same for the Visual Studio 2005 command prompt.
Command-line Considerations
The DevEnv.exe command-line switches, /setup, /installvstemplates, and /associatefiles, require administrative permissions for proper operation. Invoking these commands without elevated administrator permissions could result in data loss.
The workaround is to run a command window with elevated administrator permissions and then start DevEnv.exe by using the required command-line switch.
Programming Considerations
The system registry and the Program Files folder and its subfolders are virtualized under Windows Vista. A system registry key set by a program that is running without administrative permissions is not available to a program that is running with administrative permissions.
Programming Files to Prompt for Permissions on Windows Vista
You can cause any executable file built in Visual Studio to prompt for administrative permissions by setting the UAC manifest in the PE header. For more information, see Windows Vista Application Development Requirements for User Account Control Compatibility or Developer Best Practices and Guidelines for Applications in a Least Priv.
Running VSSDK Samples
By default, the Visual Studio SDK installs all its content in the Program Files folder, which is restricted in Windows Vista. If you open a sample and attempt to build it, errors may occur. The following is a workaround for this problem:
Copy the \VisualStudioIntegration\Samples\ folder to your personal documents folder.
When you move the sample files, they cannot be built or run because they contain relative references to other files. The references are broken when the sample files are moved.
To fix the broken references, right-click the sample project file in Solution Explorer. Replace all relative paths with absolute paths to the Samples folder.
The sample should now build. If it does not build, look for other relative paths and change them to absolute paths.
See Also
Concepts
VSPackage Development and Deployment Considerations for Windows Vista
UAC Common Error Dialog Box Extensibility