Error while running signability test while using HCK API (C#) 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. 

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

    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);

    Best Regards 


    Friday, December 9, 2016 11:53 PM