New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"No symbols found in document" for listed file in project #5051
Comments
@DanGoesIntercept Not sure if moving packages is a supported. Unity will generate the .sln and .csproj files for your project. The .csproj files have paths to each C# file that is included. If you moved the C# files, those paths may no longer be correct. |
Thanks for the response. I generated the project files after I had moved the directory, and the paths in the project file are accurate in where they're pointing for the C# files: Edit: oh jeez, no they're not. It looks like unity is generating the wrong path in the project file. The actual path is |
Hopefully it won't be hard to get fixed. I am going to close this issue out. |
Issue Description
I'm trying to get unity working with visual studio code for a package that I've moved to the Packages directory, but visual studio code refuses to recognize that the files in the package are files that it should know about and produce an outline for.
cross posted here
Steps to Reproduce
To reproduce this, I'm using:
First, I create a new 3D project in Unity. I install input system from the package manager. I move the com.unity.inputsystem@1.0.2 directory from the package cache to the packages directory. Unity preferences looks like this:
I click "regenerate project files". I open inputsystem.cs like this:
It opens in visual studio code, but when I look at the omnisharp log, it gives me the subject error:
However, InputSystem.cs is in a compile include in Unity.InputSystem.csproj, which is included in the active solution in visual studio code.
Expected Behavior
outline should be populated with symbols
Actual Behavior
outline says "no symbols pound in document"
Logs
OmniSharp log
`Starting OmniSharp server at 2/8/2022, 11:38:08 AM
Target: d:\VSCodeTest\input test\input test.sln
OmniSharp server started.
Path: c:\Users\dan.goes.vscode\extensions\ms-dotnettools.csharp-1.24.0.omnisharp\1.38.0\OmniSharp.exe
PID: 53528
Starting OmniSharp on Windows 6.2.9200.0 (x64)
info: OmniSharp.Services.DotNetCliService
Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
info: OmniSharp.Services.DotNetCliService
Using the 'dotnet' on the PATH.
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Visual Studio Professional 2019 16.4.29905.134 16.4.0 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin"
2: StandAlone 17.0.0 - "c:\Users\dan.goes.vscode\extensions\ms-dotnettools.csharp-1.24.0.omnisharp\1.38.0.msbuild\Current\Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Visual Studio Professional 2019 16.4.29905.134 16.4.0 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin"
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'd:\VSCodeTest\input test'.
info: OmniSharp.Cake.CakeProjectSystem
Did not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'd:\VSCodeTest\input test\input test.sln'.
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:\VSCodeTest\input test\Unity.InputSystem.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:\VSCodeTest\input test\Unity.InputSystem.IntegrationTests.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'd:\VSCodeTest\input test\Unity.InputSystem.TestFramework.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'd:\VSCodeTest\input test'.
info: OmniSharp.Script.ScriptProjectSystem
Did not find any CSX files
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'd:\VSCodeTest\input test' on host 39316.
info: OmniSharp.MSBuild.ProjectManager
Loading project: d:\VSCodeTest\input test\Unity.InputSystem.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'd:\VSCodeTest\input test\Unity.InputSystem.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'd:\VSCodeTest\input test\Unity.InputSystem.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: d:\VSCodeTest\input test\Unity.InputSystem.IntegrationTests.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'd:\VSCodeTest\input test\Unity.InputSystem.IntegrationTests.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'd:\VSCodeTest\input test\Unity.InputSystem.IntegrationTests.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: d:\VSCodeTest\input test\Unity.InputSystem.TestFramework.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'd:\VSCodeTest\input test\Unity.InputSystem.TestFramework.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'd:\VSCodeTest\input test\Unity.InputSystem.TestFramework.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: Unity.InputSystem
info: OmniSharp.MSBuild.ProjectManager
Update project: Unity.InputSystem.IntegrationTests
info: OmniSharp.MSBuild.ProjectManager
Update project: Unity.InputSystem.TestFramework
[warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService
No document found. File: d:\VSCodeTest\input test\Packages\com.unity.inputsystem@1.0.2\InputSystem\InputSystem.cs.
`
C# log
`Installing C# dependencies...
Platform: win32, x86_64
Finished`
Environment information
VSCode version: 1.64.0
C# Extension: 1.24.0
Dotnet Information
.NET SDK (reflecting any global.json): Version: 6.0.101 Commit: ef49f6213aRuntime Environment:
OS Name: Windows
OS Version: 10.0.19042
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.101\
Host (useful for support):
Version: 6.0.1
Commit: 3a25a7f1cc
.NET SDKs installed:
3.1.101 [C:\Program Files\dotnet\sdk]
6.0.101 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: