cake-vscode
cake-vscode copied to clipboard
Warn users that Cake.exe is missing when calling "Install Intellisense Support"
When checking out a repository clean, common sense would dictate that after executing the "Install intellisense support" Intellisense would work right off the bat (Given that troubleshooting steps have been taken (like making sure OmniSharp is installed, or that the Project has been loaded).
But what happens is, that for OmniSharp to work it is necessary that the regular bootstrapper has been called beforehand, because otherwise Cake.exe is not available.
Cake-VSCode should either:
- spawn an Error Fly-In prompting the user to the lack of the Cake.Exe
- call the generation of the cake.exe by itself
Actually it seems /tools/Cake/Cake.Core.dll is required,
The error from OmniSharp is:
[fail]: OmniSharp.Cake.CakeProjectSystem
d:\_dev\test-123\bob.cake will be ignored due to an following error
System.IO.FileNotFoundException: Cake is not installed. Path d:/_dev/test-123/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 280
at OmniSharp.Cake.CakeProjectSystem.AddCakeFile(String cakeFilePath) in D:\a\1\s\src\OmniSharp.Cake\CakeProjectSystem.cs:line 124
~~@gep13 for a project/bootstrapper that will use the .NET global tool the "workaround" of calling the bootstrapper will no longer work. Should we ensure a version of Cake being downloaded into the tools folder (along with Cake.Bakery) or should we raise an issue upstram? (Or both...)~~ No, my fault. https://github.com/cake-build/bakery/issues/108 addressed that problem and my mistake was not to test with .NET global tool installed.
So we need to make sure that either the .NET global tool is installed globally or the local runner-of-choice is restored. We could try to detect packages.config|tool-manifest and start a restore if needed.
After https://github.com/cake-build/bakery/pull/109/files issue may still happen with Chocolatey installation: https://github.com/cake-build/bakery/issues/115
It is worth to notify user about issue to locate Cake.Core.dll as it requires quite some time to identify trouble in log to understand why IntelliSense does not work.