如何在 Visual Studio 2017 中设置格式以正确缩进我的 Razor (vbhtml) 代码?

How can I get formatting to indent my Razor (vbhtml) code correctly in Visual Studio 2017?

如何在 Visual Studio 2017 中设置格式以正确缩进我的 Razor 代码?

@Helpers.LabeledGroup("Label:", "infoBox", @@<text>
            <input type="text" id="infoBox"
                   data-dojo-type="app/widget/form/InfoBox" />
</text>)

每次我按 CTRL-K、CTRL-D 设置文档格式时,每次我设置代码格式时,输入文本都会越来越向右缩进:

@Helpers.LabeledGroup("Label:", "infoBox", @@<text>
                                                                                                                                            <input type="text" id="infoBox"
                                                                                                                                                   data-dojo-type="app/widget/form/InfoBox" />
</text>)

我已经尝试了一些扩展,但它们似乎没有帮助。我也尝试过调整输入标签的格式(将其放在不同的行上),但这似乎也无济于事。我试过使用块而不是智能标签并切换到空格而不是标签。 None 这些想法也行得通。有什么建议吗?

Microsoft 终于在 VS 2017 v15.8 中解决了这个问题。