Skip to content

[Improvement] Report xml file location when xml parsing fails #3178

@chhh

Description

@chhh

Is your improvement request related to a problem? Please describe.
I was confused when in a solution with 20+ projects I ran gitversion and got an XmlException printed that didn't mention the exact file that was causing problems. And 100 lines of git log were printed in addition.

Detailed Description

I was trying to update csproject filesin a solution with 20+ projects. I ran gitversion and got an XmlException printed that didn't mention the exact file that was causing problems. At this point I had no idea what files gitversion was even trying to parse that made it fail.

Context

Updating version info in multiple csproject files in a large solution.

Possible Implementation

Simply wrap xml reading call in try/catch and add file location in XmlException message.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions