Error while running signability test while using HCK API RRS feed

  • Question

  • I encounter an unhandled exception "Error while running signability test" while running the AddDriver method with HCK api. When I use the GUI and add the same folder with "Add Driver Folder" button, everything works fine.

    After the exception the error count and warning will remain 0. 

    How can I fix the problem?

    I have included part of my code:

                driverPath = "path\\to\\driver\\folder"            

                PackageWriter packageWriter = new PackageWriter(project);
                List<Target> targetList = new List<Target>();
                foreach (ProductInstance pi in project.GetProductInstances())

                List<string> localeList = new List<string>();
                int index = -1;
                ReadOnlyCollection<string> fullLocaleList = ProjectManager.GetLocaleList();
                foreach (string value in fullLocaleList)
                    Console.WriteLine("read: {0}", value);
                    if (value.Equals(EnglishLocale))

                StringCollection errorMessages;
                StringCollection warningMessages;

    if (packageWriter.AddDriver(driverPath, null, targetList.AsReadOnly(), localeList.AsReadOnly(), out errorMessages, out warningMessages) == false)
                    Console.WriteLine("Add driver failed to add this driver found at : {0}", driverPath);
                    foreach (string message in errorMessages)
                        Console.WriteLine("Error: {0}", message);

                // warnings might not cause the method to fail, but may still be present
                if (warningMessages.Count != 0)
                    Console.WriteLine("Add driver found warnings in the package found at : {0}", driverPath);
                    foreach (string message in warningMessages)
                        Console.WriteLine("Warning: {0}", message);

    According to the API, AddDriver should return false even if the driver failed the signability tests instead of throw an exception

    Friday, December 9, 2016 8:01 PM

All replies

  • I had met this error before while using the PackageWriter.AddDriver method. And I found that this exception has an InnerException property that imply this method need to read a file named "WindowsProtectedFiles.xml" which supposed to be include in your HCK Studio folder like "C:\Program Files (x86)\Windows Kits\8.1\Hardware Certification Kit\Studio". 

    So the solution is copy this "WindowsProtectedFiles.xml" file to the folder that your exe located.

    • Proposed as answer by Congming Xue Friday, April 21, 2017 4:38 AM
    Friday, April 21, 2017 4:37 AM