cake-build / cake-vscode Goto Github PK
View Code? Open in Web Editor NEWContains Cake extension for Visual Studio Code.
Home Page: https://marketplace.visualstudio.com/items?itemName=cake-build.cake-vscode
License: MIT License
Contains Cake extension for Visual Studio Code.
Home Page: https://marketplace.visualstudio.com/items?itemName=cake-build.cake-vscode
License: MIT License
This is what it is after all, however, by default, VSCode opens this an as XML document.
As per this issue:
Extension is currently using:
// The Cake bootstrapper URIs.
"cake.bootstrappers": {
"powershell": "http://cakebuild.net/download/bootstrapper/powershell",
"bash": "http://cakebuild.net/download/bootstrapper/bash"
},
Hi,
We noticed your extension in package.json
is using a "initialConfigurations"
contribution in a deprecated way by specifiying a command id.
We wanted to let you know that we plan to delete support for this specific use of "initialConfigurations" soon.
More about this deprecation can be found here and in our release notes.
A good example on how to use the DebugConfigurarationProvider
which is the new way of doing this can be found here
Kind regards,
Isidor from the VSCode team
The Cake Task is there, but it isn't currently hooked up to anything.
Wrong repo! Moved to cake-build/cake-vs#41
Currently, to setup dotnet core debugging in a folder for cake script, it's a little bit more work than I'd like :)
I'm proposing that a command be created for this vs-code extension that does a couple things:
.vscode/launch.json
file with the default template, which assumes build.cake should be run../tools/
dir (where the launch.json template expects it) when this command is run.Not really picky or sure what the command should be, but maybe something like Cake: Install Debugging
According to this, I expected #region
s in Cake script to be collapsible, but they're not. Am I missing something? I'm using VSCode 1.0.0 and version 0.1.1 of the Cake extension.
Once the Cake.Bakery package is downloaded from the install command, we should restart the Omnisharp server so that things can start up.
This will prevent the need to close/open Visual Studio Code when setting up for the first time.
Have a read of this twitter discussion:
As per an email from the Visual Studio Marketplace team, there are going to be restrictions on the usage of SVG's in both readme's and icons.
Update the Cake extension to remove the usage of svg's.
When encountering a directive like #load "foo/bar.cake"
then highlighting is broken and stays white instead of blue like other directives.
Right now, in order to set a breakpoint within a build.cake file, you have to switch to the C# language. We should be able to do this when it is set to Cake Script.
This was discussed here: microsoft/vscode#11566
This should only happen when running on CI Server, i.e AppVeyor or Travis.
The keyword highlighting also highlights the left parenthesis after the keyword:
Note: I open this issue since #22 seems to be stuck because no proper issue exists.
To help with the task of creating the following:
var target = Argument("target", "Default");
There should be tab stops for each portion of the Argument definition.
Similar to what was provided for the Cake.CoreCLR Debugger
The syntax highlighting that is provided by this Cake extension is actually preventing it from being able to light up the intellisense that is offered by Omnisharp. This is due to the fact that Omnisharp works with C# files, rather than Cake Files.
What I mean by this is, with this extension in play, Cake files are identified at Cake Script files:
When we need them to be identified as C# files:
As you can see from these screenshots though. With the default syntax highlighting offered with VSCode for C# files, I don't actually think that there is any further need for custom syntax highlighting.
Currently it is not possible to run cake tasks when the cake.build/.ps1 is not in the root.
This should somehow be configurable.
Its simply not working no scripts are loaded see the zip in this issue cake-build/cake#1588 i get messages indicating that it cant find variables etc that live inside the #load script. Anyone of @mholo65 and @agc93 knows anything about this ?
Would help omnisharp cake support.
Using the sample that is shown here:
http://cakebuild.net/docs/tutorials/setting-up-a-new-project
There is some missing documentation in the readme.md file, this needs to be filled out with everything that the extension now does.
I have tried to use the "Cake: Install a configuration file" within vscode but instead of an expected configuration file it created a cake.config
file with a server error page inside:
<!DOCTYPE html>
<html>
<head>
<title>The current identity (IIS APPPOOL\cakebuild) does not have write access to 'D:\local\Temporary ASP.NET Files'.</title>
<meta name="viewport" content="width=device-width" />
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
@media screen and (max-width: 639px) {
pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
}
@media screen and (max-width: 479px) {
pre { width: 280px; }
}
</style>
</head>
<body bgcolor="white">
<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
<h2> <i>The current identity (IIS APPPOOL\cakebuild) does not have write access to 'D:\local\Temporary ASP.NET Files'.</i> </h2></span>
<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
<br><br>
<b> Exception Details: </b>System.Web.HttpException: The current identity (IIS APPPOOL\cakebuild) does not have write access to 'D:\local\Temporary ASP.NET Files'.<br><br>
<b>Source Error:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code>
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>
</td>
</tr>
</table>
<br>
<b>Stack Trace:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
[HttpException (0x80004005): The current identity (IIS APPPOOL\cakebuild) does not have write access to 'D:\local\Temporary ASP.NET Files'.]
System.Web.HttpRuntime.SetUpCodegenDirectory(CompilationSection compilationSection) +10003412
System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +204
[HttpException (0x80004005): The current identity (IIS APPPOOL\cakebuild) does not have write access to 'D:\local\Temporary ASP.NET Files'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9947380
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261
</pre></code>
</td>
</tr>
</table>
<br>
<hr width=100% size=1 color=silver>
<b>Version Information:</b> Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1055.0
</font>
</body>
</html>
<!--
[HttpException]: The current identity (IIS APPPOOL\cakebuild) does not have write access to 'D:\local\Temporary ASP.NET Files'.
at System.Web.HttpRuntime.SetUpCodegenDirectory(CompilationSection compilationSection)
at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)
[HttpException]: The current identity (IIS APPPOOL\cakebuild) does not have write access to 'D:\local\Temporary ASP.NET Files'.
at System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
--><!--
This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
Windows 10 Enterprise
VS Code 1.3.1
Cake Plugin 0.4.0
This is just a tracking issue to cover (eventually) changing from the current initialConfigurations
API to the new DebugConfigurationsProvider
API introduced with 1.16
Docs here.
I'd appreciate any help getting debugging to work. I F5 in VSCode 1.15.1 32-bit on a cake script (that works) I get:
Processing build script...
Installing addins...
Loaded 'g:\mc\Schema\tools\Cake.CoreCLR\NuGet.Frameworks.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'g:\mc\Schema\tools\Cake.CoreCLR\System.Diagnostics.StackTrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Error: System.InvalidOperationException: Something went wrong when parsing framework.
at Cake.NuGet.V3.NuGetV3ContentResolver.ParseFromDirectoryPath(NuGetFramework current, DirectoryPath path)
at Cake.NuGet.V3.NuGetV3ContentResolver.GetAddinAssemblies(DirectoryPath path)
at Cake.NuGet.NuGetPackageInstaller.Install(PackageReference package, PackageType type, DirectoryPath path)
at Cake.Core.Scripting.ScriptProcessor.InstallAddins(ScriptAnalyzerResult analyzerResult, DirectoryPath installPath)
at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments)
at Cake.Commands.DebugCommand.Execute(CakeOptions options)
at Cake.CakeApplication.Run(CakeOptions options)
at Cake.Program.Main()
The program '[39968] Cake.dll' has exited with code 1 (0x1).
Cake 0.2.1.1
Cake.CoreCLR 0.21.1
To help with identifying issues with the build.
This suggestion was made by @egamma
New version of build.sh and the Cake version that uses Roslyn will enable builds on Mac Os X.
This unfortunately means that build must be performed with
--settings_skipverification=true
since not all things are updated at the same time.
i.e. a single command to add all standard Cake files.
Similar to the output from the Cake Yeoman Generator
These two extensions are now intrinsically linked, and we want to use some features that appear in the other extension.
As a result, we should take a dependency on it in our package.json file.
Information here:
https://code.visualstudio.com/docs/extensionAPI/extension-manifest
Similar to the command that was created for packages.config.
Changes in the tools folder are not ignored properly when committing, due to the .gitignore file being rather specific about which files are ignored in that directory.
I propose a change in line with the example here https://github.com/github/gitignore/blob/master/VisualStudio.gitignore in order to exclude the entire tools directory except the packages.config-file.
Windows 10
Extension version:
0.8.0
#addin nuget:?package=Cake.Git
var target = Argument("target", "Default");
Task("Default")
.Does(() =>
{
var greeting = "Hello World!";
Information(greeting);
});
RunTarget(target);
; This is the default configuration file for Cake.
; This file was downloaded from https://github.com/cake-build/resources
[Nuget]
Source=https://packages.nuget.org/api/v2
[Roslyn]
NuGetSource=https://packages.nuget.org/api/v2
[Paths]
Tools=./tools
Addins=./tools/Addins
Modules=./tools/Modules
{
"version": "0.2.0",
"configurations": [
{
"name": "Cake: Debug Script",
"type": "coreclr",
"request": "launch",
"program": "${workspaceRoot}/tools/Cake.CoreCLR/Cake.dll",
"args": [
"${workspaceRoot}/build.cake",
"--debug",
"--verbosity=diagnostic"
],
"cwd": "${workspaceRoot}",
"stopAtEntry": true,
"externalConsole": false
}
]
}
Breakpoint in Default is hit
Error: System.InvalidOperationException: Something went wrong when parsing framework.
at Cake.NuGet.V3.NuGetV3ContentResolver.ParseFromDirectoryPath(NuGetFramework current, DirectoryPath path)
at Cake.NuGet.V3.NuGetV3ContentResolver.GetAddinAssemblies(DirectoryPath path)
at Cake.NuGet.NuGetPackageInstaller.Install(PackageReference package, PackageType type, DirectoryPath path)
at Cake.Core.Scripting.ScriptProcessor.InstallAddins(ScriptAnalyzerResult analyzerResult, DirectoryPath installPath)
at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary`2 arguments)
at Cake.Commands.DebugCommand.Execute(CakeOptions options)
at Cake.CakeApplication.Run(CakeOptions options)
at Cake.Program.Main()
The program '[2652] Cake.dll' has exited with code 1 (0x1).
Remove #addin nuget:?package=Cake.Git
and it works.
If #addin nuget:?package=Cake.Git
is included, Run Tasks -> Run Default works.
There's a few issues in the build script causing things to fail to build on macOS:
Version info is being pulled from non-existent source code: https://github.com/cake-build/cake-vscode/blob/develop/build/version.cake#L22
The usual code path that runs on windows is being explicitly skipped and so another code path which is no longer valid is run instead.
VscePackage command cannot locate vsce that was installed, we need to add ToolPath here on macOS: https://github.com/cake-build/cake-vscode/blob/develop/build.cake#L114
I'm not sure if this is appropriate for linux, but on macOS simply setting ToolPath = "/usr/local/bin/vsce"
is a workable solution.
For some reason Clean
is being run AFTER Install-Vsce
if I just invoke the Default target. I'm not sure if this is something weird happening with the Mono Scripting engine and can be ignored once Roslyn support is released or what.
If we continue to push out new versions of this, i think there is some extra work to do in order to support upgrades:
microsoft/vscode#537 (comment)
Just thought I would mention this here in case.
Hi,
when i start with cake in a project i can install a bootstrapper and a config file throgh this plugin.
Thats nice but not sufficent for me.
It would be nice, when i can install a build.cake script file also. Preferably with a working skeleton like the one from the Setting up a new project page.
So i can open Code in a project without cake and can install the bootstrapper, config and a running build scripts.
Thanks & Greetings,
Andreas
Which are then automatically added to the tasks.json file.
This is dependent on this: microsoft/vscode#11565 getting implemented.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.