My development machine is running Windows 7 Ultimate x64. I installed Visual Studio 2010 Ultimate. When I open the Visual Studio Command Prompt (2010), I get the message
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
I have also setup the PowerShell Community Extensions in my Windows PowerShell user profile. And I use the Invoke-BatchFile cmdlet to install the Visual Studio Tools into all my PowerShell sessions
$vcargs = ?: {$Pscx:Is64BitProcess} {'amd64'} {'x86'}
$vcvars = "${env:VS100COMNTOOLS}..\..\VC\vcvarsall.bat"
Invoke-BatchFile $vcvars $vcargs
My vcargs resolves to amd64. I looked in the vcvarsall.bat file for the location of the x64 batch file and got ~dp0bin\amd64\vcvars64.bat. That directory (and file) does not exist.
How do I get the vcvars64.bat file installed properly?
Install the x64 Components
The problem is an incomplete installation of Visual Studio. I only installed the C# components. I needed to install, at least, the Visual C++ x64 Compilers and Tools.
Adding Components to an Existing Installation
I had problems adding those components to an existing installation. VS2010, especially with SP1 installed, has a ton of bugs around modifying the installation. I encountered some kind of path not found error