Freigeben über


How to: build from the Windows SDK command line

To build from the SDK command line:

1. Copy your application or sample to a working folder not under \Program Files.

2. Open the Windows SDK CMD shell (Start, All Programs, Windows SDK v6.1, SDK CMD Shell).

3. Navigate to directory where your sample/app can be found.

4. Build the sample from the command line as follows:

  • Build a makefile by typing nmake
  • Build a .csproj file by typing msbuild *.csproj /p:platform=[ win32 | X64 | IA64]
  • Build a .vbproj file by typing msbuild *.vbproj /p:platform=[ win32 | X64 | IA64]
  • Build a .sln file by typing msbuild *.sln /p:platform=[ win32 | X64 | IA64]
  • Build a .vcproj by typing vcbuild *.vcproj /platform=[ win32 | X64 | IA64 ]

When building with MSBUILD, you should specify a target platform. If a sample is configured to build for different platform types and you don't specify a which platform you wish to build for, the first platform listed in the solution or project file will be built. Configurations are listed in alphabetical order by Visual Studio, so ‘Itanium’ may be the first configuration listed. You are likely not building for Itanium – not many people do.

If you want to build an application configured for an X86 machine, choose ‘win32’:

msbuild mysample.vbproj /p:platform=win32

If you want to build an application configured for an X64 machine, choose ‘X64’:

msbuild mysample.vbproj /p:platform=X64

Want to build an X64 application but your sample doesn’t have an X64 configuration? See How to Add 64-bit Support to VCProj Files.

Comments

  • Anonymous
    December 14, 2007
    The comment has been removed
  • Anonymous
    December 14, 2007
    The comment has been removed