Nmake2MsBuild

Note The Nmake2MsBuild tool was removed from the WDK starting in Windows 10, version 1511.

The Nmake2MsBuild utility generates a Visual Studio project for a driver that was built using a previous version of the WDK from your driver's source code files, and from the sources, dirs, and makefile.inc files. The utility creates the Visual Studio project file in the same directory as your existing sources files. The utility does not alter your source code or your earlier build files.

For information about using the utility, see Converting a WDK sources file to a Visual Studio project.

Syntax

The Nmake2MsBuild.exe utility has the following syntax:

NMake2MSBuild.exe  < sources [<sources>...] | dirs >
                          [-Name:<Name of output project>]
                          [-Package:<Path to package project file to generate>]
                          [-Solution:<Path to Solution file to generate>]
                          [-Log:[<LogFile>]:[<Verbosity>]]
                          [-ConsoleLog:<Verbosity>]
                          [-NoPackageProject]
                          [-NoSolution]
                          [-SafeMode]

The conversion tool is located in the %PROGRAMFILES%\Windows Kits\8.0\tools\x86\ directory.

sources

Specifies the path to the sources file for a driver built with the previous version of the WDK. If you specify a sources file, the utility parses that sources file and the corresponding makefile.inc and generates a Visual Studio project file. The Visual Studio project file is placed in the same directory as the sources file.

You can specify more than one sources files at a time. All resulting projects will share the same Solution and Package Project.

dirs

Specifies the path to the dirs file for a driver built with the previous version of the WDK. If you specify a dirs file, the utility looks in the directory tree for all sources files and the corresponding makefile.inc files and generates a Visual Studio project files for each one.

-Package:<Path to Package file to generate> Specifies a custom name for the driver package project file.
-Solution:<Path to Solution file to generate> Specifies a custom name for the driver solution file (.sln).
-Log:[<LogFile>]:[<Verbosity>] Specifies a name for the Log file, and specifies the level of logging (see Verbosity).
-ConsoleLog:<Verbosity> Specifies a name for the Console log file, and specifies the level of logging (see Verbosity).

-Name:<Name of output project>

Specifies a custom name for the VcxProj file that will be generated. Alternatively, if a dirs file is being converted, this parameter is used to specify the name of the generated solution.

Verbosity The default logging levels for Log file and Console logging are Verbose and Information respectively. Verbosity is one of System.Diagnostics.SourceLevels.
-SafeMode SafeMode does not provide IDE/UI support for NMAKE targets, but could provide a more accurate conversion for NMAKE targets. Only specify -SafeMode if you experience issues during build steps that were previously performed in your project's NMAKE targets.

Comments

The conversion tool is located in the %PROGRAMFILES%\Windows Kits\8.0\tools\x86\ directory.

Response (.Rsp) files are supported for specifying command line parameters. Each parameters should be specified on a separate line.

Example

To build a driver project that was built with a previous version of the WDK (using Build.exe and a sources and dirs file), you must first convert it to a .VcxProj project using Nmake2MsBuild.exe conversion utility.

For example, to convert a driver that was previously built with the Windows 7 WDK, called MyDriver, you first open a Visual Studio Command Prompt window. Browse to the directory or supply the path to the directory that contains the sources or dirs build configuration file. For example, the following command generates the MyDriver.Vcxproj file in the same folder as the sources file.

nmake2msbuild.exe  .\myDriver\sources

Converting a WDK sources file to a Visual Studio project

Creating a Driver From Existing Source Files