Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
NullReferenceException in pyro.exe #4072
While creating a patch with pyro.exe v3.7 I receive the following exception:
pyro.exe : error PYRO0001:
Exception Type: System.NullReferenceException
Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object
I looked into the problem deeper, I built the WIX toolset from the source code and found that the problem occurs in the file PatchTransform.cs in line 171:
The variable removeFileTable was null in my case. After having added an "if" check for null, the problem was gone and I saw the following warning:
warning PYRO1095: File 'libexslt.dll' was removed from component 'X'. Removing a file from a component will not result in the file being removed by a patch. You should author a RemoveFile element in your component to remove the file from the installation if you want the file to be removed.
Obviously in my project there was no RemoveFile and the tool failed to process it.
I propose to insert "if not null" check in the PatchTransform.cs file for the removeFileTable variable just the way it is done in the other lines of the file.