You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define a key "Test" with the following multiline value:
MyTest
/asdf
In your project settings activate "Treat warnings as errors". Also activate "XML documentation file".
Compile
Expected Behavior:
No warnings (that are treated as errors) for automatically generated code.
The ResXFileCodeGenerator should have escaped the slash in the XML comment with /. It already escapes characters like < and >.
Or: it should have inserted a space after the leading /// that start the XML comment.
Actual Behavior:
The compiler generates warnings (that are treated as errors) for the automatically generated property.
Error CS1570 XML comment has badly formed XML -- 'summary' Error CS1570 XML comment has badly formed XML -- '{0}'
The generated code looks like:
/// <summary>
/// Looks up a localized string similar to MyTest
////asdf.
/// </summary>
internal static string Test {
get {
return ResourceManager.GetString("Test", resourceCulture);
}
}
The problem here is the slash ("/") in the second line of the resource text.
Since all projects in my team enforce "treat warnings as errors" this effectively leads to a non-compiling project.
The text was updated successfully, but these errors were encountered:
Version Used:
VS2017 (15.6.2)
Steps to Reproduce:
MyTest
/asdf
Expected Behavior:
No warnings (that are treated as errors) for automatically generated code.
The ResXFileCodeGenerator should have escaped the slash in the XML comment with
/
. It already escapes characters like<
and>
.Or: it should have inserted a space after the leading
///
that start the XML comment.Actual Behavior:
The compiler generates warnings (that are treated as errors) for the automatically generated property.
Error CS1570 XML comment has badly formed XML -- 'summary'
Error CS1570 XML comment has badly formed XML -- '{0}'
The generated code looks like:
The problem here is the slash ("/") in the second line of the resource text.
Since all projects in my team enforce "treat warnings as errors" this effectively leads to a non-compiling project.
The text was updated successfully, but these errors were encountered: