Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #1003 #1004

Merged
merged 1 commit into from
Apr 17, 2023
Merged

Fix issue #1003 #1004

merged 1 commit into from
Apr 17, 2023

Conversation

philippejer
Copy link
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
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