csharp-language-server
csharp-language-server copied to clipboard
Incorrect number of references displayed on Godot project
As the picture shows, the number of refernces displayed is incorrect. This is the only file in the project, so everything gets referenced inside this file. I can guarantee there is no other references. In fact, if I try to find references for a certain variable/function, it gives the correct number of references. Adding new references or removing existing references is reflected correctly on the number of references though the total number of references is not correct.
The content of the .csproj file:
<Project Sdk="Godot.NET.Sdk/4.2.1">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
</Project>
The source code file:
using Godot;
// using System;
public partial class player : Area2D
{
[Export]
public int Speed { get; set; } = 400;
public Vector2 ScreenSize;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
ScreenSize = GetViewportRect().Size;
}
// // Called every frame. 'delta' is the elapsed time since the previous frame.
// public override void _Process(double delta)
// {
// }
}
Note that this issue only occurs in a Godot project, I have tested a clean project that does not depends on Godot, and there is no such issue.