Open shashank-sharma opened 2 years ago
You need to have a project file available, since files are added to the workspace through projects.
@filipw I have project file as:
total 16
drwxr-xr-x 3 root root 4096 May 5 11:04 .
drwxr-xr-x 1 root root 4096 May 5 11:04 ..
-rw-r--r-- 1 root root 239 May 5 11:04 file.csproj
-rw-r--r-- 1 root root 0 May 5 11:04 file.cs
drwxr-xr-x 2 root root 4096 May 5 11:04 obj
And even get some logs as:
{
jsonrpc: '2.0',
method: 'o#/projectadded',
params: {
MsBuildProject: {
ProjectGuid: '00000000-0000-0000-0000-000000000000',
Path: '/13764770-cc63-11ec-aaac-b3713373339b/file.csproj',
AssemblyName: 'file',
TargetPath: '/13764770-cc63-11ec-aaac-b3713373339b/bin/Debug/net6.0/file.dll',
TargetFramework: '.NETCoreApp,Version=v6.0',
SourceFiles: [Array],
TargetFrameworks: [Array],
OutputPath: 'bin\\Debug/net6.0/',
IntermediateOutputPath: 'obj/Debug/net6.0/',
Configuration: 'Debug',
Platform: 'AnyCPU',
IsExe: true,
IsUnityProject: false
}
}
}
MESSAGE: {
jsonrpc: '2.0',
method: 'o#/projectchanged',
params: {
MsBuildProject: {
ProjectGuid: '00000000-0000-0000-0000-000000000000',
Path: '/13764770-cc63-11ec-aaac-b3713373339b/file.csproj',
AssemblyName: 'file',
TargetPath: '/13764770-cc63-11ec-aaac-b3713373339b/bin/Debug/net6.0/file.dll',
TargetFramework: '.NETCoreApp,Version=v6.0',
SourceFiles: [Array],
TargetFrameworks: [Array],
OutputPath: 'bin\\Debug/net6.0/',
IntermediateOutputPath: 'obj/Debug/net6.0/',
Configuration: 'Debug',
Platform: 'AnyCPU',
IsExe: true,
IsUnityProject: false
}
}
}
I made sure that file.csproj is present and dotnet restore
happens.
Is there something else which is wrong here ?
Any update on this?
@filipw can you please check the filestructure and confirm if anything is missing out? cc/ @shashank-sharma
I am using release 1.38.2 -
omnisharp-linux-x64-net6.0.tar.gz
lsp server command: dotnet [ '/lsp-server/omnisharp/OmniSharp.dll', '-lsp' ]If I try to pass any input to the LSP server, I get this error:
"OmniSharp.Roslyn.CSharp.Services.Completion.CompletionService: Could not find document for file /13764770-cc63-11ec-aaac-b3713373339b/file.cs | 0='/13764770-cc63-11ec-aaac-b3713373339b/file.cs'"
And if I check the path of
file.cs
file which is created, then it's present at exact same directory. Can anyone help me with what might be wrong with the LSP server ? (Tested using Monaco editor)This is not specific to net6.0, happens with mono as well (Given codebase is same, it's a different issue), so is there any configuration which I might be missing ?
Trimmed logs: