Git Product home page Git Product logo

nake's Introduction

Nake

Nake is a magic task runner tool for .NET Core. It's a hybrid of Shovel and Rake. The DSL for defining tasks is uniquely minimal and it's just plain (naked) C# code! Nake is built on top of the latest Roslyn release so you can use all of the latest C# features in you scripts and even more.

Gitter Build status NuGet

Terms of use

By using this project or its source code, for any purpose and in any shape or form, you grant your implicit agreement to all the following statements:

  • You condemn Russia and its military aggression against Ukraine
  • You recognize that Russia is an occupant that unlawfully invaded a sovereign state
  • You support Ukraine's territorial integrity, including its claims over temporarily occupied territories of Crimea and Donbas
  • You reject false narratives perpetuated by Russian state propaganda

To learn more about the war and how you can help, click here. Glory to Ukraine! πŸ‡ΊπŸ‡¦

How to install

Nake is built as dotnet tool. You can install it either globally of locally (recommended):

PM> dotnet tool install Nake

Syntax cheatsheet

#r "System                          //
#r "System.Core"                    //
#r "System.Data"                    //   #reference assemblies from the netstandard BCL   
#r "System.Xml"                     //       (these are referenced by default)
#r "System.Xml.Linq"                //    
#r "Microsoft.CSharp"               //

#r "System.IO, Version=4.0..."      //  you can reference assembly by its full name
#r "./Packages/nunit.dll"           //        or by using relative path
#r "/usr/bin/SDK/Orleans.dll"       //            or by absolute path
                                        
#r "nuget: Streamstone, 2.0.0"      //  Nake is using dotnetscript dependency resolution
#r "nuget: Newtonsoft.Json"         //  so referencing nuget packages is fully supported
#r "nuget: Orleankka, 2.*"          //  https://github.com/filipw/dotnet-script#nuget-packages-1

#load "Other.csx"                   //      #load code from other script files
#load "Build/Another.csx"           //  (both absolute and relative paths are fine)

using System;                       //
using System.IO;                    //      standard C# namespace imports
using System.Linq;                  //     (these are imported by default)
using System.Text;                  //  
using System.Threading.Tasks;       //    
using System.Collections.Generic;   //  

using static System.IO.Path;        //    C# "using static members" feature 
using static System.Console;        //      will make you scripts more terse

WriteLine("Are you ready? Y/N:");   //      any code you put on the script level 
if (ReadLine() == "N")              //  will run before any of the tasks are executed
    Exit("See you soon ...");       //      (useful for one-off initialization)

var greeting = "Hello";             //   you can override any script-level variables 
var who = "world";                  //  with the values passed from the command line

/// Prints greeting                 //  this F#-style summary is shown in task listing
[Nake] void Welcome()               //  [Nake] makes method runnable from command line
{                                       
    Write($"{greeting},{who}!");    //  forget ugly string.Format & string concatenation 
}                                   //   with built-in support for string interpolation

[Nake] void Tell(
    string what = "Hello",          //     for parameterized tasks you can supply
    string whom = "world",          //     arguments directly from the command line
    int times = 1,                  //          (string, int, boolean and 
    DayOfWeek when,                 //         enum arguments are supported)
    bool quiet = false              //  + switch-like syntax for booleans (eg, --quiet)
)
{
    var emphasis = quiet ? "" : "!";
    for (; times > 0; times--)
	    WriteLine($"{what}, {whom} on {when}{emphasis}");
}                                   

[Step] void Clean()                  //     Steps are tasks with 'run once' semantics      
{                                    //     (foundation of any build automation tool)
    Delete($"{OutputPath}/*.*");	
}                                   

[Step] void Build(string cfg = "Debug")
{					                    
    Clean();                        //  unlike popular tools, there is no special syntax
    -------                         //     for specifying task (step) dependencies
    MSBuild("Nake.sln", cfg);       //    (it's just plain old C# method invocation)
}                                       
                                       
[Step] void Test()
{					                    
    Clean();                        //     you have complete control over decision,
    Build();                        //  when and in what order dependent steps should run
    -------                         //      (and Nake makes sure of run-once behavior)
    NUnit($"{OutputPath}/*.Tests.dll");   
}

[Step] void Publish(bool beta = false)
{					                    
    Test();                         //   sometimes, you need to execute the same step but with
    Build("Release");               //  different args. Unlike other build automation tools
    ------                          //  there is no special syntax to force step to run again, 
    Nuget("Nake.nuspec", beta);     //       you just invoke it with different arguments!
}                                       

var apiKey = "$NugetKey$";          //      $var$ is the shortcut syntax for getting 
Push(apiKey, "{PackagePath}");      //          value of environment variable

const string ApiKey = "$APIKEY$";   //     environment variables defined in constant scopes
void Push(string key = "$APIKEY$")  //       evaluated once at compile-time (ie, inlined)

var ApiKey = "$APIKEY$";            //     environment variables defined in variable scopes
Write("$APIKEY$");                  //       evaluated at invocation-time (dynamic)

Write("$NakeStartupDirectory$");    //       these special environment variables
Write("$NakeWorkingDirectory$");    //        are automatically created by Nake

var root = "$NakeScriptDirectory$"; //   this is how you can get script directory inlined
Write(Location.NakeScriptDirectory) //   alternatively call this method from Nake.Utility

Write("{{esc}}");                   //  will simply print {esc} (no string interpolation)
Write("$$esc$$");                   //  will simply print $esc$ (no env variable inlining)

Cmd($"docker build -f {spec} .");   //        you can use Shell.Cmd to execute 
Cmd($"echo {title}");               //         commands via shell interpreter ...

r = await Run($"docker images");    //      and you can get the result of the execution
Write(result.StandardOutput);       //    by using functionality provided by MedallionShell

Run("app") < new FileInfo("input")  //   this includes fancy composable piping and redirects

await $"docker rm {cid} .";         //      or simply await the cli string to get it executed
                                    //    this is the the most convenient way to execute commands

await $@"docker logs --tail 10 \    //      backslash (\) as line continuation symbol
         {container}";              //        could be used with verbatim strings

await "app 'quoted arg'"            //   use ' quote for arguments that contain spaces
await "app 'quoted '' quote'"       //       '' quote to insert a single quote

await $"app '{path}'"               //   you may quote interpolations that may contain space
await $"app {path}"                 //     but Nake will do it automatically for you ;)
await $"app {arg}\\;;;"             //   and MedallionShell will properly escape the arguments

class Azure                         //  namespace declarations cannot be used with scripts,
{                                   //  but could be easily emulated with class declarations
    class Queue                     //     and you can nest them infinitely as you like
    {    
        [Task] void Clean()         //     then from the command line you would invoke
        {}                          //   this task by its class path (ie, azure queue clean)
    }
}

[Nake] void Default() => Build();   //          running Nake without any options 
                                    //       will cause it to run the "default" task

Command line reference

General syntax is: Nake [options ...] [VAR=VALUE ...] [task ...]

> Nake -f "Nake.csx" Log=1 build    //       set Log environment variable to 1 and
                                    //      then run Build() task from Nake.csx file 
                                        
> Nake Log=1 build                  //  equivalent to the above as Nake will automatically try 
                                    //   to use Nake.csx file if present in current directory

Options:

   -?  --help             Display help message and exit
   -v  --version          Display the program version and exit
   -q  --quiet            Do not echo informational messages to standard output
   -s  --silent           Same as --quiet but also suppresses user generated log messages
   -f  --nakefile FILE    Use FILE as Nake project file
   -d  --directory DIR    Use DIR as current directory
   -t  --trace            Enables full stack traces in error reporting + task execution trace
       --debug            Enables full script debugging in Visual Studio
   -T  --tasks [PATTERN]  Display tasks with descriptions matching optional PATTERN and exit
   -r  --reset-cache      Resets compilation output cache

Invoking tasks

General syntax for invoking tasks and passing arguments is similar to the normal C# method invocation syntax, except is used instead of , to separate task arguments, and = is used instead of : for specifying named argument values. Also, boolean arguments support special -- switch syntax.

> Nake build                          //  run Build task with default arg values
> Nake build Release                  //  or with first positional argument set to 'Release'
> Nake build cfg=Release              //  or with named argument 'cfg' set to 'Release'
> Nake build Release outDir="/c/Tmp"  //  you can mix positional and named arguments
> Nake build ; test                   //  or invoke multiple tasks within a same session
> Nake build `; test                  //  also escape ';' when running in PowerShell console 
> Nake publish --beta                 //  invoke Publish task with 'beta' arg set to 'true'

Included utility reference

Out-of-the box Nake includes a lot of useful convinient utility functions to help you with:

  • running external tools, such as command-line commands or MSBuild
  • selecting and transforming file system paths (globber)
  • casual file system tasks, such as copying, moving, deleting files/folders
  • logging messages to console
  • working with environment variables
  • controlling Nake's runner
  • etc

Check out table below for reference on using utility library:

Class Functions
Shell Executing programs and shell commands
Session Controlling current Nake's runner session
Log Logging messages to console
Env Working with environment variables
FS File-system tasks, such as copy/move/del/mkdir/etc
FileSet File path selection and transformation (globber)
Color Printing to console in color
Location Current directory and special paths (working, startup)

Also, see 'by use-case' reference on wiki.

Tips & tricks

class Azure
{                                       
    StorageAccount account;
    
    static Azure()                  //  this will run once before any of the 
    {                               //  tasks in this namespace are executed
        account = Init();           //  (useful for one-off initialization)
    }
}  

Backlog

  • Check the open issues

Contributing

Make sure you follow the coding guidelines which exists on a project (either as R# formatting settings or .editorconfig). Nothing else)

Samples and Documentation

Have a look at Nake.csx. It's a Nake file used to build and publish Nake itself (ye, we're eating our own dog food).

Community

General discussion group could be found here. Also, for news you can follow Nake's official twitter account (or my account for that matter). The twitter's hashtag is #naketool.

Credits

  • Thanks to everyone in the Roslyn compiler team for making this happen
  • Thanks to everyone in the dotnet-script team
  • Thanks to MedallionShell community for the great project
  • Special thanks to Anton Martynenko for giving me an idea and steering Nake's DSL in the right direction
  • Hugs and kisses to my lovely Valery for being so patient and supportive, and for feeding me food and beer, while I was sitting in my cage working on Nake, instead of spending that time with her

License

Apache 2 License

nake's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nake's Issues

Automatic quotation of interpolations

Since the actual values that will be inlined from interpolations are opaque, to get rid of possible misinterpretation of values that may contain spaces, the interpolations need to be quoted, e.g. await $"app '{path}'".

It would be super-cool if we can do the automatic quotation of interpolated expressions when such strings are the input to await or Shell.Run.

Concerns:

  • Interpolations which area already quoted
  • Interpolations which reside inside quotes, e.g. await $"app 'some {path} arg with spaces'"
  • Interpolations which reside between quotes, e.g. await $"app 'arg1' {path} 'arg2'"
  • How to determine if interpolation should be quoted for a particular invocation (e.g. call to Shell.Run)?

Running on .NET Core

In principle, it should be relatively easy to run Nake on Mono using Xamarin's version of Roslyn, but Utility library requires more serious effort. In order to have faster TTM, Utility library was built on top of MSBuild, so a lot of built-in functions such as those in FS class need to be rewritten using only .NET apis.

Similar situation is with MSBuild function. Mono uses it's own XBuild engine, to build .NET projects. It's compatible with MSBuild project format and possibility of hosting it within Nake (like MSBuild) need to be investigated. Or layer of indirection should be created.

For the rest, some minor stuff which uses native Win32 calls should be done with conditional compilation. For the whole list, MOMA could be used.

Patch assemblies with build version

Currently, the assembly file version is not updated for package release. Since caching is dependent on the version of Nake this may break it.

Stepping back from this project - help wanted

Hello, all!

This was first OSS project and I'm still think it's one of the best task runners 'by design', but my life is changing in a way that I won't have enough spare time working on that. You might have already noticed that I haven't touched anything here for a year or so. Which is not a good situation for an OSS project.

If you feel like this project is useful to you and you want to progress it further, or/and would be willing to take custodianship of NuGet publishing and project admin rights, please email me privately - [email protected] (or DM on twitter to @yevhen).

Thanks,
Hope for the best,
Yevhen

Update to .NET 7

Hi,

I upgrade all my app to .NET7 since few weeks.
Do you plan to update Nake to support this last major version ?

Thanks

Multi-level caching

Currently, the project behind the script is re-generated and restore is initiated on every change to the script, despite that none of the dependencies were actually changed. Align the behavior with dotnet-script by introducing similar multi-level caching (dependencies + script code).

Sample script scaffolding

Introduce special command to create sample Nake script and omnisharp.json file to have VSCode intellisense support.

  • It should be possible to specify sample script name.
  • Do not overwrite existing files (warn)

Any updates ?

Hi,

I was looking for a C# build automation tool :

  • Cake : interesting but limited to a defined subset of C# provided by API ref.
  • Nuke : does not support scripting, not what i wante.

Then i discovered Nake, and it fits all my needs :

  • base on script (csx file)
  • support C# and many cool feature (nuget...)

But 18 month since the last commit, app is in beta 2 and does not run in .NET5.
So what's problem : lack of contributors or app contains to many bugs ?

Thanks

Array arguments

Support tasks which have (params string[] args) parameters. Could be supplied as comma-separated list from the command line

Fix wiki documentation for Shell

  • Complete documentation for Shell.Cmd
  • Complete documentation for Shell.Run
  • Samples for piping and redirects
  • Samples for using Tee class
  • Document await-ing strings
  • Document argument escaping in commands
  • Document backslash for line continuations

Nested tasks cli invocation syntax

Change current cli invocation syntax for calling nested tasks (the tasks defined within a class) to use spaces (e.g. dotnet tool list) instead of dots (dotnet.tool list)

Orphan nake.bat and nake.csx files after opening VS

Given following project structure:

project
|_src
| |_packages
| | |_Nake.2.3.1
| |_project.sln
| 
|_nake.bat
|_nake.csx

Whenever I open project.sln in Visual Studio, two sample Nake files nake.bat and nake.csx are created inside src folder. Which is not desired behavior - since I have my nake files already in a parent folder.

Analysis

That's init.ps1 script who copies sample nake files. According to Nuget docs it's executed every time when solution is opened in VS.

Print task argument documentation to console

Nake supports printing information about all available tasks to console via dotnet nake -T switch. This prints task name and description, which is parsed from method's xml documentation (either F# style or normal <summmary> tag). It would be cool to support more detailed task listing which also includes descriptions of task arguments.

The argument documentation may come from standard xml documentation of the task method. The user may invoke printing of detailed task description by passing --help switch after task name: dotnet build --help. If task has declared boolean argument of this name, the automatic printing is suppressed and task is called with help=true. This will allow users to override default behavior to print their own help.

Asking for missing arguments

In PowerShell, when you run Cmdlet and don't supply all required parameters, it will ask to provide value for each missing argument. Should be relatively easy to have something similar in Nake.

FS.RemoveDir does not handle exclusion pattern for files

I've followed this example from Nake.csx:

RemoveDir(@"**\bin|**\obj|{path}\*|-:*.vshost.exe");    

Expecting that folders containing *.vshost.exe files (presumably locked by VS) would not be removed.
However Nake tries to remove them according to this message:

Removing directory "C:\projects\..\someproj\bin".
MSBUILD : error MSB3231: Unable to remove directory "C:\projects\..\someproj\bin". Access to the path SomeProj.vshost.exe' is denied.
Microsoft.Build.Tasks.RemoveDir failed

Probably such exclusion for files should not be used with RemoveDir, as it is not really consistent with FileSet exclusion semantics. But on the other hand, such exclusion looks very handy. So I'm not sure whether it worth it to fix behavior. Or it's better to fix Nake.csx instead :)

Other possible approach could be adding a standard ContinueOnError msbuild parameter to the RemoveDir extension.

Include some batteries

The shared theme with existing task runners is to provide some kind of utility library to help with the common file system operations, like mirroring directories. Think about including some of the most important into Nake.Utility package.

Spaces in directory confuses params passed to MSBuild

MSBUILD : error MSB1008: Only one project can be specified.
Switch: Samples\Orleankka\Output;ReferencePath=C:\Users\a\Code

For switch syntax, type "MSBuild /help"
Process exited with code 1

Actual directory name was "Code Samples"

Empty Nake.csx fails to run with 3.0.0-beta-02 due to NuGet resolution errors

I created an empty Nake.csx just to give Nake a try. Attempting to run dotnet tool run nake (version 3.0.0-beta-01) gives:

Unable to restore packages from 'C:\Users\alex\AppData\Local\Temp\scripts\C\Users\alex\source\repos\tests\netcoreapp3.1\script.csproj'. Make sure that all script files contains valid NuGet references

The contents of that file are:

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <LangVersion>latest</LangVersion>
  </PropertyGroup>
  <ItemGroup></ItemGroup>
  <Target Name="RecordReferencePaths" AfterTargets="AfterResolveReferences">
    <WriteLinesToFile File="$(OutputPath)/ReferencePaths.txt" Lines="@(ReferencePath)" />
  </Target>
</Project>

Running with --trace gives:

Creating project file for *.csx files found in C:\Users\alex\source\repos\tests using netcoreapp3.1 as the default framework.
Parsing C:\Users\alex\source\repos\tests\Nake.csx
Project file saved to C:\Users\alex\AppData\Local\Temp\scripts\C\Users\alex\source\repos\tests\netcoreapp3.1\script.csproj
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <LangVersion>latest</LangVersion>
  </PropertyGroup>
  <ItemGroup></ItemGroup>
  <Target Name="RecordReferencePaths" AfterTargets="AfterResolveReferences">
    <WriteLinesToFile File="$(OutputPath)/ReferencePaths.txt" Lines="@(ReferencePath)" />
  </Target>
</Project>
Computing compilation dependencies
Creating project file for *.csx files found in C:\Users\alex\source\repos\tests using netcoreapp3.1 as the default framework.
Parsing C:\Users\alex\source\repos\tests\Nake.csx
Project file saved to C:\Users\alex\AppData\Local\Temp\scripts\C\Users\alex\source\repos\tests\netcoreapp3.1\script.csproj
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <LangVersion>latest</LangVersion>
  </PropertyGroup>
  <ItemGroup></ItemGroup>
  <Target Name="RecordReferencePaths" AfterTargets="AfterResolveReferences">
    <WriteLinesToFile File="$(OutputPath)/ReferencePaths.txt" Lines="@(ReferencePath)" />
  </Target>
</Project>
Restoring C:\Users\alex\AppData\Local\Temp\scripts\C\Users\alex\source\repos\tests\netcoreapp3.1\script.csproj using the dotnet cli. RuntimeIdentifier : win10-x64 NugetConfigFile: C:\Users\alex\source\repos\tests\NuGet.Config
Executing 'dotnet restore "C:\Users\alex\AppData\Local\Temp\scripts\C\Users\alex\source\repos\tests\netcoreapp3.1\script.csproj" -r win10-x64  --configfile "C:\Users\alex\source\repos\tests\NuGet.Config"'
  Determining projects to restore...
C:\Users\alex\AppData\Local\Temp\scripts\C\Users\alex\source\repos\tests\netcoreapp3.1\script.csproj : error NU1100: Unable to resolve 'Microsoft.NETCore.App.Runtime.win-x64 (= 3.1.7)' for '.NETCoreApp,Version=v3.1'.
C:\Users\alex\AppData\Local\Temp\scripts\C\Users\alex\source\repos\tests\netcoreapp3.1\script.csproj : error NU1100: Unable to resolve 'Microsoft.WindowsDesktop.App.Runtime.win-x64 (= 3.1.7)' for '.NETCoreApp,Version=v3.1'.
C:\Users\alex\AppData\Local\Temp\scripts\C\Users\alex\source\repos\tests\netcoreapp3.1\script.csproj : error NU1100: Unable to resolve 'Microsoft.AspNetCore.App.Runtime.win-x64 (= 3.1.7)' for '.NETCoreApp,Version=v3.1'.
  Failed to restore C:\Users\alex\AppData\Local\Temp\scripts\C\Users\alex\source\repos\tests\netcoreapp3.1\script.csproj (in 148 ms).
Unable to restore packages from 'C:\Users\alex\AppData\Local\Temp\scripts\C\Users\alex\source\repos\tests\netcoreapp3.1\script.csproj'. Make sure that all script files contains valid NuGet references
   at Dotnet.Script.DependencyModel.Context.DotnetRestorer.Restore(ProjectFileInfo projectFileInfo, String[] packageSources)
   at Dotnet.Script.DependencyModel.Context.ProfiledRestorer.Restore(ProjectFileInfo projectFileInfo, String[] packageSources)
   at Dotnet.Script.DependencyModel.Compilation.CompilationDependencyResolver.GetDependencies(String targetDirectory, IEnumerable`1 scriptFiles, Boolean enableScriptNugetReferences, String defaultTargetFramework)
   at Nake.Scripting.Script.CompilationDependencies(ScriptSource source) in C:\Work\OSS\Nake\Source\Nake\Scripting\Script.cs:line 108
   at Nake.Scripting.Script.Compile(ScriptSource source, AssemblyReference[] dependencies) in C:\Work\OSS\Nake\Source\Nake\Scripting\Script.cs:line 70
   at Nake.BuildEngine.Compile(ScriptSource source, AssemblyReference[] dependencies) in C:\Work\OSS\Nake\Source\Nake\Build.cs:line 68
   at Nake.BuildEngine.Build(BuildInput input) in C:\Work\OSS\Nake\Source\Nake\Build.cs:line 54
   at Nake.CachingBuildEngine.Build(BuildInput input) in C:\Work\OSS\Nake\Source\Nake\Caching.cs:line 59
   at Nake.Application.Build(ScriptSource source, IEnumerable`1 declarations) in C:\Work\OSS\Nake\Source\Nake\Application.cs:line 105
   at Nake.Application.Invoke(ScriptSource source, IEnumerable`1 declarations)
   at Nake.Application.Start() in C:\Work\OSS\Nake\Source\Nake\Application.cs:line 54
   at Nake.Program.StartApplication(String[] args) in C:\Work\OSS\Nake\Source\Nake\Program.cs:line 55
   at Nake.Program.Main(String[] args) in C:\Work\OSS\Nake\Source\Nake\Program.cs:line 19
   at Nake.Program.<Main>(String[] args)

... which isn't terribly helpful either, as far as I can tell.

In case it matters, my dotnet --info is:

.NET Core SDK (reflecting any global.json):
 Version:   3.1.401
 Commit:    5b6f5e5005

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19042
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.1.401\

Host (useful for support):
  Version: 5.0.0-preview.7.20364.11
  Commit:  53976d38b1

.NET SDKs installed:
  2.1.802 [C:\Program Files\dotnet\sdk]
  3.0.100 [C:\Program Files\dotnet\sdk]
  3.1.102 [C:\Program Files\dotnet\sdk]
  3.1.201 [C:\Program Files\dotnet\sdk]
  3.1.202 [C:\Program Files\dotnet\sdk]
  3.1.401 [C:\Program Files\dotnet\sdk]
  5.0.100-preview.7.20366.6 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.0-preview.7.20365.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.0-preview.7.20364.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.0-preview.7.20366.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

I wonder if there's some kind of issue caused by the fact that I'm using .NET 5? I wouldn't think so since tools are supposed to run with the .NET Core version they're built for, and I do have .NET Core 3 installed as well...

how to debug a nake script (csx file) in visual studio

Hi Yevhen,

I trust you are well!
Could you please suggest is there a way to debug a nake script in visual studio?
There doesn't seem to be any info available on this in net.

Any info would be mach appreciated.
Thanks in advance.

PS:
There is some link how to debug csx files with scriptcs.exe:
https://github.com/scriptcs/scriptcs/wiki/Debugging-a-script
but it doesn't seem to be helpful with nake scripts, when you don't even have scriptcs.exe on your PC, but have nake package, and using nake.exe instead of scriptcs.exe as per this instruction doesn't seem to be helpful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.