简体   繁体   English

IntelliSense 在 VS2019 中不适用于我的 XML 文档,我附加了一个架构

[英]IntelliSense is not working in VS2019 for my XML document to which I have a schema attached

I thought if I attach a schema to an XML document, I would get IntelliSense for all the tag and attribute names?我想如果我将架构附加到 XML 文档,我会获得所有标签和属性名称的 IntelliSense 吗? But that doesn't seem to be working.但这似乎不起作用。 I tried adding this to my root tag:我尝试将此添加到我的根标签中:

xsi:noNamespaceSchemaLocation="../../../schema1.xsd"

And I also tried adding my schema to the list of schemas under Properties > Schemas in Visual Studio.而且我还尝试将我的架构添加到 Visual Studio 中“属性”>“架构”下的架构列表中。

Microsoft does not care.微软不在乎。 I have reported this and found one other report...我已经报告了这一点,并找到了另一份报告...

https://developercommunity.visualstudio.com/t/Visual-Studio-2019-does-not-detect-xsd-s/1458785 https://developercommunity.visualstudio.com/t/intellisense-ignores-xsd-schema-definitions/554115?viewtype=all https://developercommunity.visualstudio.com/t/Visual-Studio-2019-does-not-detect-xsd-s/1458785 https://developercommunity.visualstudio.com/t/intellisense-defignstudio.com/t/intschema /554115?viewtype=全部

The only way I have found to work around this is to have these xsd schemas actively open in Visual Studio.我发现解决此问题的唯一方法是在 Visual Studio 中主动打开这些 xsd 模式。 Keep in mind though, that if you have the xsd schemas open, close and re-open VS, even if those schemas still appear "open" because they are visible in file tabs, you still have to manually go to them or re-open them before you get intellisense back.但请记住,如果您打开、关闭并重新打开 VS 的 xsd 架构,即使这些架构仍然显示为“打开”,因为它们在文件选项卡中可见,您仍然必须手动 go 或重新打开他们在你得到智能感知之前。

This is a clear regression and it's very frustrating that MS would ignore it.这是一个明显的回归,MS 会忽略它是非常令人沮丧的。

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

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