在 Visual Studio 2022 中未显示 git 信息 Codelens

问题描述 投票:0回答:1

在我的 Visual Studio Community 2022 中,Codelens 不显示与 git 相关的选项。

工具 > 选项 > 文本编辑器 > 所有语言 > CodeLens

我的visul工作室没有这些选项。

  • 显示时间线 (Git)
  • 显示作者和更改 (Git)

Not show this options (img)

它在类和方法上显示“0 个引用”,但不显示“git 更改和作者”(0 个更改 | 0 个作者)

    0 refernces // but not show => 0 changes | 0 authors
    public void HelloWord()
    {
       Console.WriteLine("Hello Word");
    }

my problem here (img)

我希望是这样。

I want it here (img)

    0 refernces | 0 changes | 0 authors
    public void HelloWord()
    {
       Console.WriteLine("Hello Word");
    }

问题:我必须做什么?

c# visual-studio codelens
1个回答
7
投票

此功能在

Visual Studio 2022 Professional
中可用,部分功能在
community
版本中不支持。

Tools > Options > Text Editor > All Languages > CodeLens

之后,请确保选中窗口最顶部的

Enable Code Lens
重新启动您的 Visual Studio。

© www.soinside.com 2019 - 2024. All rights reserved.