Visual studio stops recognize Unity after modifying script

Whenever I create or remove a C# script in Unity, after loading time, Visual Studio seems to unrecognize Unity. It can not find unity methods or properties anymore. This can be “fixed” by reloading Visual Studio, so annoying. After searching for quite some time, the only maybe-right answer is it was a bug, and I tried to update VS to the latest version but still. Please help me.
Edit: There is one problem that may relate to this: whenever I open project from Visual Studio, the terminal immediately points to another folder ( …/source/repos) instead of the project folder. I’ve tried to set the default git folder to my project but it still there. This is my .sln file:


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{306B9622-6474-0D19-83D7-B08F35872B12}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MerryYellow.CodeAssist.Editor", "MerryYellow.CodeAssist.Editor.csproj", "{C3D4239D-D018-B482-8898-6CDEB249BFA7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Plugins.Baedrick.ColoredHeaderCreator", "Plugins.Baedrick.ColoredHeaderCreator.csproj", "{AB44080B-D8BD-1251-1634-601F95755E9C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Plugins.Baedrick.ColoredHeaderCreator.Editor", "Plugins.Baedrick.ColoredHeaderCreator.Editor.csproj", "{0CD7DA8A-E6B5-1850-7268-01325C7D270D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.InputSystem.RebindingUI", "Unity.InputSystem.RebindingUI.csproj", "{73B44488-0F16-4CAA-E0A9-42E4D3AE50D1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HueFolders.Editor", "HueFolders.Editor.csproj", "{AA57FC96-8638-5941-D68C-2FFACCF4FA11}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{306B9622-6474-0D19-83D7-B08F35872B12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{306B9622-6474-0D19-83D7-B08F35872B12}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{306B9622-6474-0D19-83D7-B08F35872B12}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{306B9622-6474-0D19-83D7-B08F35872B12}.Release|Any CPU.Build.0 = Release|Any CPU
		{C3D4239D-D018-B482-8898-6CDEB249BFA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{C3D4239D-D018-B482-8898-6CDEB249BFA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{C3D4239D-D018-B482-8898-6CDEB249BFA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{C3D4239D-D018-B482-8898-6CDEB249BFA7}.Release|Any CPU.Build.0 = Release|Any CPU
		{AB44080B-D8BD-1251-1634-601F95755E9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{AB44080B-D8BD-1251-1634-601F95755E9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{AB44080B-D8BD-1251-1634-601F95755E9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{AB44080B-D8BD-1251-1634-601F95755E9C}.Release|Any CPU.Build.0 = Release|Any CPU
		{0CD7DA8A-E6B5-1850-7268-01325C7D270D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{0CD7DA8A-E6B5-1850-7268-01325C7D270D}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{0CD7DA8A-E6B5-1850-7268-01325C7D270D}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{0CD7DA8A-E6B5-1850-7268-01325C7D270D}.Release|Any CPU.Build.0 = Release|Any CPU
		{73B44488-0F16-4CAA-E0A9-42E4D3AE50D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{73B44488-0F16-4CAA-E0A9-42E4D3AE50D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{73B44488-0F16-4CAA-E0A9-42E4D3AE50D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{73B44488-0F16-4CAA-E0A9-42E4D3AE50D1}.Release|Any CPU.Build.0 = Release|Any CPU
		{AA57FC96-8638-5941-D68C-2FFACCF4FA11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{AA57FC96-8638-5941-D68C-2FFACCF4FA11}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{AA57FC96-8638-5941-D68C-2FFACCF4FA11}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{AA57FC96-8638-5941-D68C-2FFACCF4FA11}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

I don’t know where to set the path.
EDIT 2: My scripts are still Assembly-CSharp file.

Sorry! I found the answer just after click posting the last EDIT. For one later looking for the answer: in unity Preferences> External Tools> remember to check Player Projects then regenerate project files again. Please moderators, remove this post if it against any rule. Thank you!