XML documentation setting prevents app from building in Release configuration
Steps to reproduce
-
Have a VB app with XML Documentation checked in project settings, set to \bin\FixityVB.xml
-
Convert to C#
-
Change to release configuration
-
App won't build. Error is: Error CS2021 File name ‘C:\dev\fixity\FixityVB\bin\’ is empty, contains invalid characters, has a drive specification without an absolute path, or is too long
-
Go into project settings, change config from Debug to Release. Notice that when you change to Release, the XML documentation file changes from "bin\FixityVB.xml" to "bin\ .xml" (several blank spaces or invalid characters)
-
Uncheck the XML documentation file box
-
Recheck it
-
File changes back to "bin\FixityVB.xml"
-
Now the program will run under Release configuration.
Error message shown
Error CS2021 File name ‘C:\dev\fixity\FixityVB\bin\’ is empty, contains invalid characters, has a drive specification without an absolute path, or is too long
Details
CC 8.40
Project file tweaks are handled by regexes here: https://github.com/icsharpcode/CodeConverter/blob/ccb288b5637c9d96285c3580d1e76275f4c0c4af/CodeConverter/Shared/ProjectConversion.cs#L122-L131
and here: https://github.com/icsharpcode/CodeConverter/blob/1a1e34979727bb469ca62fe0765cf0b7a9bc7242/CodeConverter/CSharp/VBToCSConversion.cs#L71-L83
The latter is probably the right place to fix this one - ideally with unit tests similar to these: https://github.com/icsharpcode/CodeConverter/blob/0c39437a1937283664cc3481c3faf9a9bf4b8854/Tests/LanguageAgnostic/ProjectFileTextEditorTests.cs#L11-L25