dotnet/roslyn

Case sensitivity check for xml documentation tags is wrong

開放

#7,822 建立於 2016年1月7日

 (2 則留言) (0 個反應) (0 位負責人)C# (4,257 個分叉)batch import
Area-CompilersBugTenet-Compatibilityhelp wanted

倉庫指標

星標
 (20,414 顆星)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 256 個 PR)

描述

When compiling C# code, roslyn ignores cases for XML Document tags. On the other hand, roslyn is case sensitive when processing VB code.

An example:

\\\ <Summary> Simple test method</Summary>
\\\ <Param name="parameter">A sample parameter </Param>
\\\ <returns> The value of parameter</returns> 
public static bool TestMethod(bool parameter){ return parameter; }

This will compile fine in VS2015, but not VS2013. The documentation comments are also illegal for VB now. We discovered this, because a <Param>-tag inside our documentation caused the build to fail when we tested VS2015. We also believe that the implemented behavior is backwards to what it should be, as C# is usually case sensitive, while VB is not.

See file src/Compilers/Core/Portable/InternalUtilities/DocumentationCommentXmlNames.cs, the method ElementEquals(), line 40.

貢獻者指南