Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support .NET Core #2716

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

joshcangit
Copy link

Requirements for Adding, Changing, or Removing a Feature

Issue or RFC Endorsed by Atom's Maintainers

Description of the Change

The change use different commands for Linux.
Mainly, depending on .NET Core.

For C#, dotnet is used instead of mono.

Might want to change csc to dotnet csc when that becomes available.

For C# scripts, dotnet script is used instead of scriptcs.

Might want to change to dotnet csi when that beomes available.

For F# scripts, dotnet fsi is used instead of fsharpi

Alternate Designs

I haven't made checks which may need the lookpath Node.js package.
That is to check maybe if mono or dotnet is installed.

Possible Drawbacks

The dotnet script seems to be only in user directory.
That may mean .csx won't work outside the user environment.

Verification Process

I use certain files to test this.

  • C# example
using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World!");
    }
  }
}
  • C# script
//usr/bin/env dotnet script "$0" "$@";exit $?

var fw = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription;
var arch = System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture;
Console.WriteLine($"Hello world ({fw}, {arch})");
  • F# script
//usr/bin/env dotnet fsi "$0" "$@";exit $?

printfn "Hello world!"

Release Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant