简体   繁体   English

为F#记录值生成的IntelliSense XML不正确(VS2013)

[英]Incorrect IntelliSense XML generated for F# record values (VS2013)

Update: as noted in the comments, this is a bug. 更新:如评论中所述,这是一个错误。 I've reported it to Microsoft and it has been routed to a VS development team for investigation. 我已向微软报告,并已将其发送给VS开发团队进行调查。 I'll update this answer if and when there's news. 如果有新闻,我会更新这个答案。

Further update: a fix has been committed to the project on CodePlex , yay! 进一步更新:已经修复了CodePlex上的项目 ,是的!


Given a record type: 给定记录类型:

namespace Rather.Deep.Namespace

type TestRecord = {
    /// Property summary
    Prop : string
}

VS2013 generates the following IntelliSense XML for this field: VS2013为此字段生成以下IntelliSense XML:

<member name="F:Rather.Deep.Namespace.Rather.Deep.Namespace.TestRecord.Prop">
 <summary>Property summary</summary>
</member>

I know about record values being treated as though they are fields and not properties. 我知道记录值被视为字段而不是属性。 I can deal with that. 我可以解决这个问题。 What I can't understand is: why is the namespace being doubled? 我无法理解的是: 为什么名称空间被加倍?

(If you want to try for a repro, create a new library project in VS2013 containing nothing but that file, and look at the generated XML file in the bin folder. I just updated to VS2013.1—still no dice.) (如果你想尝试一个repro,在VS2013中创建一个只包含该文件的新库项目,并查看bin文件夹中生成的XML文件。我刚刚更新到VS2013.1 - 仍然没有骰子。)

As I suspected, and a couple of commentators agreed, this is a bug. 正如我所怀疑的,有几位评论员同意,这是一个错误。 I submitted a bug report on Microsoft Connect with a minimal test project attached, and not too long later a fix was committed to the project on CodePlex . 我提交了一份关于Microsoft Connect错误报告,附带了一个最小的测试项目,不久之后,修复程序被提交到CodePlex上的项目 Good job, F# team! 干得好,F#团队!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM