Is there an example running on .Net Core?

I am a new user with the tool. I need to put the Scripter to run in a .Net Core application, which will run on Linux. What packages do I have to download on Nuget? Is there any code example using this functionality?
Hello Rogerio,
Right now Scripter has some dependencies from WinForms/WPF frameworks which are not supported on Linux. We will look at what's required to remove these dependencies and see what functionality will stop working.
Do you need just running C#/VB console scripts under Linux (no debugging)?
Regards,
Andrew
Yes, only the Scripter running C# code.
Hi Andrew, please add me to the list ;). vb.net linux (without debugging is ok) Andreas
Hi,
Here are the Scripter for Linux early prototype packages and a sample app:
https://drive.google.com/open?id=1zgSg3fVADW6QKSa7jsK6n88FGt32sfNF
You can unpack the archive and run the test application with "dotnet run" command. The archive contains a "NuGet.config" file, so a local package source for the packages will be used automatically.
In the sample code, there are methods to demostrate EvaluateExpression and RunMethod functionality for running script code in local process. The script code files is in the "Scripts" subdirectory. There are test scripts for C# and for VB.NET.
There is code for RunProcess function as well, but unfortunately this doesn’t work yet on Linux, as it throws "Main method not found" exception on process start. We will have to investigate this problem further.
Regards,
Andrew
Thank you! I will test and give you feedback.
Hi,
Here's a new version where RunProcess should be working.
https://drive.google.com/open?id=1JeqhZgwkxNYRVb6Dim2FgitU3KZ0ezWZ
Regards,
Andrew
Can I compile on Windows and test before it runs on Linux?
I am getting this error.
System.ComponentModel.Win32Exception
HResult=0x80004005
Message=The system cannot find the file specified.
Source=System.Diagnostics.Process
StackTrace:
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Alternet.Common.CommandLinePathResolver.GetCommandPath(String command)
at Alternet.Common.CommandLinePathResolver.TryGetFullPathForCommand(String command)
at Alternet.Common.DefaultAssemblies.DotNetCore.DotNetCoreInstallLocator.TryGetDotNetCoreInstallLocation()
at Alternet.Common.DefaultAssemblies.DotNetCore.DotNetCoreInstallLocator..ctor()
at Alternet.Common.DefaultAssemblies.DotNetCore.DotNetCoreDefaultAssembliesProvider.EnsureServicesInitialized()
at Alternet.Common.DefaultAssemblies.DotNetCore.DotNetCoreDefaultAssembliesProvider.GetDefaultAssemblies(TechnologyEnvironment technology)
at Alternet.Scripter.ScriptSource.WithDefaultReferences(ScriptTechnologyEnvironment technology, Boolean keepExisting)
at ConsoleScript.Program.RunFile() in C:\Users\Rogerio\Downloads\linux-scripter-test-1\linux-scripter-test\test\Program.cs:line 29
at ConsoleScript.Program.Main(String[] args) in C:\Users\Rogerio\Downloads\linux-scripter-test-1\linux-scripter-test\test\Program.cs:line 12
These packages are Linux-only prototypes, as they contain only the assemblies for Linux platform. This is the reason the sample doesn’t work on Windows. A production NuGet packages would contain the assemblies for both Windows and Linux, so an application built once could be run on both platforms without recompilation.

Regards,
Andrew