none
WDF coinstallers for a V4 printing driver using VS2012 RRS feed

  • Question

  • Hello,

    We are working on a V4 printing driver using VisualStudio 2012. When we compile the project we get the following warning:

    "Please download and install the WDF redistributable co-installers from http://go.microsoft.com/fwlink/?LinkId=226396 to build a complete driver package."

    1. V4 drivers can only work on Windows 8 and Windows 8.1. So, if we use UMDF 1.11, we do not need to include WDF co-installers in our driver package. Am I right? In this case, what is the difference between UMDF 1.11 and 2.0? 

    2. Assuming that #1 is correct, we would like to get one of the following two things:

    - Is there a way to avoid the warning without getting the WDF coinstallers in the driver package?

    - Is it possible to have WDF coinstallers installed in the machine but not being added in the driver package?

    Thanks and regards,

    Roger

    Tuesday, October 8, 2013 12:20 PM

Answers

  • How did you create the package project? How did you create the v4 project ? I am guessing the v4 project has metadata indicating it is a wdf project. You don't need wdf for a printer driver. If you download the installers, the warning should go away as a temporary measure

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, October 8, 2013 2:20 PM

All replies

  • How did you create the package project? How did you create the v4 project ? I am guessing the v4 project has metadata indicating it is a wdf project. You don't need wdf for a printer driver. If you download the installers, the warning should go away as a temporary measure

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, October 8, 2013 2:20 PM
  • If you open VS2012 and create a new "Printer Driver v4" project (under Other Languages > Visual C++ > Windows Driver) and compile it without any change, it will show the warning. 

    The warning is thrown by the WindowsDriver8.0.common.targets. 

    Checking the package project properties, in Configuration Properties > General, Platform Toolset is automatically set to "WindowsKernelModeDriver8.0". If I change it to "WindowsUserModeDriver8.0", the warning still appears. Changing it to, for example, "Visual Studio 2012 (v110)" the driver package is not created. 

    So, for a v4 driver I need to set Platform toolset to "WindowsUserModeDriver8.0", which provokes the warning if I do not install the WDF co-installers (even though they are not needed for v4 printing drivers).

    If I install the co-installers, they are added to the driver package automatically.

    So, I think the solution would be to disable the warnings from the WindowsDriver8.0.common.targets. Do you know if there is a way to disable target warnings?

    Thanks,

    Roger

    Thursday, October 10, 2013 3:37 PM
  • The WDK build toolset always tries to copy the co-installers for UMDF and KMDF projects to the driver package output directory, even if the INF file of your driver package doesn't reference them. This was made to prevent cases where we somehow misinterpret the INF file and determine that the co-installers are not needed in a package, when they are in fact needed.

    If your driver package does not require the co-installers to be present, you can safely ignore the warning. There is no way to disable the warning for UMDF or KMDF projects, other than actually removing it from the targets file (which I would not recommend).

    If the co-installers are installed on your machine, the only supported way not to have the co-installers in your resulting package is to create a MsBuild post build task that removes them from the package after it is generated. This is something you can do from the driver package properties in VS (under "Custom Build Step").

    In WDK 8.1, the coinstallers are installed by default along with the WDK, so you shouldn't see that warning anymore. This means they will always be part of the resulting driver package, unless manually removed.


    Max -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, October 10, 2013 4:55 PM
  • If the coinstallers are not referenced in the INF, they are not considered a part of the driver package. So while the files may be copied to the package directory, you can choose to not copy them over the machine under test when deploying the package (and if you import the package into the driver store, the coinstallers will not be copied over b/c the INF does not reference them)

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, October 10, 2013 9:13 PM
  • Also, you should change the toolset to WindowsApplicationForDrivers8.0 (and potentially Configuration Type to Dynamic Library (.dll) ), indowsUserModeDriver8.0 is intended to be used to build a UMDF driver

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, October 10, 2013 9:15 PM