Creating a Driver Package

Driver projects and packages

A driver project is the Microsoft Visual Studio project which produces a driver binary (such as a .sys file), and potentially the driver's INF file.

A driver package is the collection of files used to install a driver. The package includes an INF file, and files and binaries referred to by that INF. Visual Studio uses driver packages to automatically deploy and debug your driver to a remote target.

A driver package is a separate project which collects output from one or more projects, such as driver projects. The driver package's project, when built, then produces the driver package which Visual Studio uses to deploy the driver.

visual studio solution explorer driver package project

Note  

If you use a driver template to create a driver solution, then the template should automatically create a solution that contains two projects. One for the driver, and another for the driver package.

Manually creating a driver package

If your solution does not have a driver package, you can manually create one in Visual Studio by choosing New > Project from the File menu. For examples of how to create a driver package, see Writing Your First Driver.

To manually create a new driver package for an existing solution that does not already have one, use the "Driver Install Package" template. Select File->New->Project. Then select Windows Drivers > Package > "Driver Install Package" from the dialog. Then in the Solution drop-down, select Add to solution and click Ok.

Modifying an existing driver package

If your solution already contains a driver package, you can modify it to reference other projects in the solution.

In the Solution Explorer pane, open the driver package project, right-click References, choose Add Reference... and select the project to reference.

To remove a reference to an existing project, right-click the existing project you no longer want to reference and click Remove.

driver package properties

Multiple drivers in a solution

You can add multiple drivers and their packages to your solution. Similar to "Modifying an existing driver package" you can create a new driver solution, or add a reference to an existing one. If your solution already contains a driver package, you can modify it to reference additional driver projects in the solution.

In the Solution Explorer pane, open the driver package project, right-click References, choose Add Reference... and select the project to reference.

To remove a reference to an existing project, right-click the existing project you no longer want to reference and click Remove.

See the "Toaster Sample Driver" sample for an example of a single solution that contains multiple drivers:multiple drivers in a single solution