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 New > Project from the File menu. Then select Windows Driver > Package > "Driver Install Package" from the dialog. Visual Studio will associate the newly created driver package with all the driver projects that were present in the solution when the driver package is created.

Modifying an existing driver package

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

Right-click on the driver package and select Properties.... Expand Common Properties and select References.

You can add a reference to other projects in the solution by clicking Add New Reference... and selecting the project to reference.

To remove a reference to an existing project, first highlight the existing project you no longer want to reference, then click Remove Reference.

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.

Right-click on the existing driver package and select Properties.... Expand Common Properties and select References.

You can add a reference to other projects in the solution by clicking Add New Reference... and selecting the project to reference.

To remove a reference to an existing project, first highlight the existing project you no longer want to reference, then click Remove Reference.

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

Related topics

Signing a Driver

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft