Skip to content

Fix issue #1003#1004

Merged
GrahamTheCoder merged 1 commit into
icsharpcode:masterfrom
philippejer:issue-1003
Apr 17, 2023
Merged

Fix issue #1003#1004
GrahamTheCoder merged 1 commit into
icsharpcode:masterfrom
philippejer:issue-1003

Conversation

@philippejer

Copy link
Copy Markdown
Contributor

See issue #1003

Problem

For the VB to CS project file conversion, <DefineDebug> and <DefineTrace> should be converted to <DefineConstants>.

Solution

  • I've used XDocument to parse and edit the XML (this is already used elsewhere in the codebase, e.g. to parse the resource files).
  • I've also done a similar job in the neighborhood for consistency and to simplify the code (especially in the case of the <DocumentationFile> conversion).
  • The main change in external behavior (aside from fixing the issue) is that the XDocument step can cause minor changes in formatting (this can be seen in the updated test files), but I don't think this is an issue (they are new files generated by the converter, not existing files).
  • I've done a small change in MultiFileTestFixture to ouput the expected file path in case of failure.
  • The code is already covered quite well by the tests, I've updated the relevant test cases.

@GrahamTheCoder
GrahamTheCoder merged commit 6db334f into icsharpcode:master Apr 17, 2023
@GrahamTheCoder

Copy link
Copy Markdown
Member

Great job, thanks for this, it's much nicer parsing the xml than purely using regexes everywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants