-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
0.6.0 Omnisharp Parsing Errors #127
Comments
Currently the IntelliSense requires the Cake .NET tool to be installed as a global tool. Based on your comment, it looks like you installed the Cake .NET tool as a local tool via the manifest (which is fine - and what's recommended for building your projects -, but specifically for the IntelliSense it's not used)... So in your case you need to have both local and global tool installed. Could you please try to install Cake as a global tool: dotnet tool install --global Cake.Tool And then restart OmniSharp (or restart VSCode)? The above works for most people and it's the standard way of getting the IntelliSense support. However, there is an edge case that seem to affect some people where the .NET Tool might be installed globally but for some reason it doesn't seem to be in the The (temporary) workaround in this case is to install the Cake .NET Core CLR runner via VS Code, as described in this discussion: Visual Studio Code Intellisense doesn't work on macOS. |
Hi Augusto, The first -normal- option didn't work but the temporary work around did. I verified that the global tool was visible from the terminal (deleting the tool-manifest). But it seems that was not visible from the Cake.Bakery tool: it was looking for it under the local tools folder. If I can be of any help providing information about my configuration, or testing something let me know. REgards, R. |
@rmbrunet Great to hear that at least you have a workaround to get the IntelliSense working! If you have a chance, could you try to clone this repo: https://github.com/augustoproiete-repros/repro-omnisharp-parsing-errors-cake-bakery and and repeat the normal steps, see if you get the same errors with OmniSharp, and post the full log here? Also, could you please post the contents of |
The last change introduced a detection based on the dotnet tool default installation location. During that change the "dotnetCakePath" was erroneously modified from pointing to the folder in which dotnet-cake resides to the dotnet-cake file itself. This commit reverts that.
Hello All, Seeing that @nils-a probably already fixed whatever was happening... @augustoproiete, will do what you asked anyway in case is useful. Ffter cloning the repo and repeating the "normal" process the result is still bad - but different than before: I see no errors in the OmniSharp Log (inlcuded below) but a lot of PROBLEMS of the type: { dotnet --info attached at the end. Installing the Debug Dependencies did fix the problems! R. =================================================== This is the OmniSharp log: Starting OmniSharp server at 3/7/2021, 7:16:42 AM OmniSharp server started. Starting OmniSharp on Windows 6.2.9200.0 (x64) =============================================================== And this is dotnet --info dotnet --info Runtime Environment: Host (useful for support): .NET SDKs installed: .NET runtimes installed: |
The last change introduced a detection based on the dotnet tool default installation location. During that change the "dotnetCakePath" was erroneously modified from pointing to the folder in which dotnet-cake resides to the dotnet-cake file itself. This commit reverts that.
(GH-127) Fixed wrong path in cake-tool detection
* hotfix/0.6.1: (GH-127) Fixed wrong path in cake-tool detection
* hotfix/0.6.1: (GH-127) Fixed wrong path in cake-tool detection
🎉 This issue has been resolved in version 0.6.1 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
Can you clarify what you did here:
There are two options when you choose this command in Visual Studio Code. Thanks |
@rmbrunet Cake.Bakery 0.6.2 should fix the |
Thanks @augustoproiete! I did test 0.6.2 all worked fine. |
Hello, seeing the following problem(s):
1.- Created brand new console application
2.- Initialized CakeBuild (tool-manifest, etc.)
3.- Added sample cake.build. Verified that it works.
3.- Installed Cake.Bakery using the VS Code Command option (Cake install enable intellisense support). Got an errors in the OmniSharp log. No intellisesense. Here is the Omnisharp log:
Starting OmniSharp server at 3/6/2021, 8:27:25 AM
Target: c:\Users\username\Source\Repos\CakeTest\CakeTest.sln
OmniSharp server started.
Path: c:\Users\username.vscode\extensions\ms-dotnettools.csharp-1.23.9.omnisharp\1.37.6\OmniSharp.exe
PID: 8360
Starting OmniSharp on Windows 6.2.9200.0 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Visual Studio Community 2019 16.9.31025.194 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
2: StandAlone 16.8.0 - "c:\Users\username.vscode\extensions\ms-dotnettools.csharp-1.23.9.omnisharp\1.37.6.msbuild\Current\Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Visual Studio Community 2019 16.9.31025.194 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\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 'c:\Users\username\Source\Repos\CakeTest'.
info: OmniSharp.Cake.CakeProjectSystem
Found 1 Cake files.
info: OmniSharp.Cake.Services.CakeScriptService
Using Cake.Bakery at c:\Users\username\Source\Repos\CakeTest\tools\Cake.Bakery\tools\Cake.Bakery.exe
[fail]: OmniSharp.Cake.CakeProjectSystem
c:\Users\username\Source\Repos\CakeTest\build.cake will be ignored due to an following error
System.IO.FileNotFoundException: Cake is not installed. Path c:/Users/username/Source/Repos/CakeTest/tools/Cake/Cake.Core.dll does not exist.
at OmniSharp.Cake.CakeProjectSystem.GetProject(CakeScript cakeScript, String filePath) in D:\a\1\s\src\OmniSharp.Cake\CakeProjectSystem.cs:line 281
at OmniSharp.Cake.CakeProjectSystem.AddCakeFile(String cakeFilePath) in D:\a\1\s\src\OmniSharp.Cake\CakeProjectSystem.cs:line 125
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'c:\Users\username\Source\Repos\CakeTest\CakeTest.sln'.
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\username\Source\Repos\CakeTest\CakeTest\CakeTest.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'c:\Users\username\Source\Repos\CakeTest'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'c:\Users\username\Source\Repos\CakeTest' on host 1012.
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\username\Source\Repos\CakeTest\CakeTest\CakeTest.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\username\Source\Repos\CakeTest\CakeTest\CakeTest.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\username\Source\Repos\CakeTest\CakeTest\CakeTest.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: CakeTest
[warn]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 226,
"Command": "/v2/codestructure",
"Arguments": {
"FileName": "c:\Users\username\Source\Repos\CakeTest\build.cake"
}
}
[fail]: OmniSharp.Stdio.Host
************ Response ************
{
"Request_seq": 226,
"Command": "/v2/codestructure",
"Running": true,
"Success": false,
"Message": ""System.NullReferenceException: Object reference not set to an instance of an object.\r\n at OmniSharp.Cake.Extensions.ResponseExtensions.d__7.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Cake\\Extensions\\ResponseExtensions.cs:line 153\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Cake.Services.RequestHandlers.CakeRequestHandler
2.<Handle>d__14.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at OmniSharp.Endpoint.EndpointHandler
2.d__19.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Endpoint.EndpointHandler2.<HandleRequestForLanguage>d__20.MoveNext() in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Host\\\\Endpoint\\\\EndpointHandler.cs:line 230\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at OmniSharp.Endpoint.EndpointHandler
2.d__16.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Host\\Endpoint\\EndpointHandler.cs:line 131\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Stdio.Host.d__13.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Stdio\\Host.cs:line 215"","Body": null,
"Seq": 32,
"Type": "response"
}
[warn]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 229,
"Command": "/v2/codestructure",
"Arguments": {
"FileName": "c:\Users\username\Source\Repos\CakeTest\build.cake"
}
}
[fail]: OmniSharp.Stdio.Host
************ Response ************
{
"Request_seq": 229,
"Command": "/v2/codestructure",
"Running": true,
"Success": false,
"Message": ""System.NullReferenceException: Object reference not set to an instance of an object.\r\n at OmniSharp.Cake.Extensions.ResponseExtensions.d__7.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Cake\\Extensions\\ResponseExtensions.cs:line 153\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Cake.Services.RequestHandlers.CakeRequestHandler
2.<Handle>d__14.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at OmniSharp.Endpoint.EndpointHandler
2.d__19.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Endpoint.EndpointHandler2.<HandleRequestForLanguage>d__20.MoveNext() in D:\\\\a\\\\1\\\\s\\\\src\\\\OmniSharp.Host\\\\Endpoint\\\\EndpointHandler.cs:line 230\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at OmniSharp.Endpoint.EndpointHandler
2.d__16.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Host\\Endpoint\\EndpointHandler.cs:line 131\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at OmniSharp.Stdio.Host.d__13.MoveNext() in D:\\a\\1\\s\\src\\OmniSharp.Stdio\\Host.cs:line 215"","Body": null,
"Seq": 37,
"Type": "response"
}
The text was updated successfully, but these errors were encountered: