diff --git a/src/Dotnet.Script/Dotnet.Script.csproj b/src/Dotnet.Script/Dotnet.Script.csproj
index 1546d172..e17ab3a5 100644
--- a/src/Dotnet.Script/Dotnet.Script.csproj
+++ b/src/Dotnet.Script/Dotnet.Script.csproj
@@ -25,7 +25,7 @@
-
+
diff --git a/src/Dotnet.Script/Program.cs b/src/Dotnet.Script/Program.cs
index c599b6b9..ff77a012 100644
--- a/src/Dotnet.Script/Program.cs
+++ b/src/Dotnet.Script/Program.cs
@@ -55,8 +55,9 @@ public static Func CreateLogFactory
private static int Wain(string[] args)
{
- var app = new CommandLineApplication(throwOnUnexpectedArg: false)
+ var app = new CommandLineApplication()
{
+ UnrecognizedArgumentHandling = UnrecognizedArgumentHandling.CollectAndContinue,
ExtendedHelpText = "Starting without a path to a CSX file or a command, starts the REPL (interactive) mode."
};
@@ -83,7 +84,7 @@ private static int Wain(string[] args)
var code = c.Argument("code", "Code to execute.");
var cwd = c.Option("-cwd |--workingdirectory ", "Working directory for the code compiler. Defaults to current directory.", CommandOptionType.SingleValue);
c.HelpOption(helpOptionTemplate);
- c.OnExecute(async () =>
+ c.OnExecuteAsync(async (cancellationToken) =>
{
var source = code.Value;
if (string.IsNullOrWhiteSpace(source))
@@ -198,7 +199,7 @@ private static int Wain(string[] args)
var dllPath = c.Argument("dll", "Path to DLL based script");
var commandDebugMode = c.Option(DebugFlagShort + " | " + DebugFlagLong, "Enables debug output.", CommandOptionType.NoValue);
c.HelpOption(helpOptionTemplate);
- c.OnExecute(async () =>
+ c.OnExecuteAsync(async (cancellationToken) =>
{
if (string.IsNullOrWhiteSpace(dllPath.Value))
{
@@ -217,7 +218,7 @@ private static int Wain(string[] args)
});
});
- app.OnExecute(async () =>
+ app.OnExecuteAsync(async (cancellationToken) =>
{
int exitCode = 0;