Skip to content

WixErrors.UnexpectedException does not display all parameters in the output windows #5805

@armsee

Description

@armsee

We use WiX 3.11.1

WixErrors.UnexpectedException(string message, string type, string stackTrace) displays only the 'message' - string in the 'Output' window or in the 'Error List' window of Visual Studio or in the console output of MSBuild. This makes troubleshooting our self-written compiler extension very difficult.

The reason for this behavior is that the message generated by WixErrors.UnexpectedException is formatted as a multiline string, but the output in the 'Output' window or in the 'Error List' window only supports single-line output. This means that the 'type' and the 'stackTrace' parameter are never displayed in the output.
Format of the UnexpectedException:

        <Message Id="UnexpectedException" Number="1" SourceLineNumbers="no">
            <Instance>
                {0}&#13;&#10;&#13;&#10;Exception Type: {1}&#13;&#10;&#13;&#10;Stack Trace:&#13;&#10;{2}
                <Parameter Type="System.String" Name="message" />
                <Parameter Type="System.String" Name="type" />
                <Parameter Type="System.String" Name="stackTrace" />
            </Instance>
        </Message>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions