News for hackers. Stuff that matters.
Re:TIO: Try it online by keganunderwood on Saturday July 15, 2017 @01:03PM (#14777639)
Not a comment about tio but I didn't realize it isn't possible to write a simple hello world in C# dot net core.

What a shitty situation.

What can we do to make it better? Provide a default csproj file on load? Any better ideas?

Microsoft (R) Build Engine version 15.3.117.23532 Copyright (C) Microsoft Corporation. All rights reserved.

code.cs(1,22): error CS1022: Type or namespace definition, or end-of-file expected [/home/runner/project/project.csproj] code.cs(1,22): error CS1026: ) expected [/home/runner/project/project.csproj]

Build FAILED.

code.cs(1,22): error CS1022: Type or namespace definition, or end-of-file expected [/home/runner/project/project.csproj] code.cs(1,22): error CS1026: ) expected [/home/runner/project/project.csproj] 0 Warning(s) 2 Error(s)

Time Elapsed 00:00:04.92 No executable found matching command "dotnet-project/bin/Debug/netcoreapp*/project.dll"

Real time: 6.033 s User time: 2.973 s Sys. time: 0.442 s CPU share: 56.61 % Exit code: 1

Re:TIO: Try it online by fizixer on Saturday July 15, 2017 @01:24PM (#14777778)
> Not a comment about tio but I didn't realize it isn't possible to write a simple hello world in C# dot net core.

Not sure why you'd think it's impossible [1]. I even ran it in the TIO C# console and it works.

[1] https://rosettacode.org/wiki/Hello_world/Text#C.23

Re:TIO: Try it online by eterm on Saturday July 15, 2017 @01:13PM (#14777699)
Just filling in some default fields in the tio editor would do. For example pre-fill the header as:

   using System;
   using System.IO;
and pre-filling Code with

   namespace example
   {
      public class Example
      {
         static void Main(){
         }
      }
   }
(But better names, my naming sucks!)

That would go a long way, then you could just add "Console.WriteLine("Hello World"); for hello world.

Re:TIO: Try it online by milesdyson_phd on Saturday July 15, 2017 @01:24PM (#14777773)
You don't even need the namespace or the usings if you just want to print hello world either.
Re:TIO: Try it online by solidsnack9000 on Sunday July 16, 2017 @12:04AM (#14780420)
What does the minimal program actually look like?
Re:TIO: Try it online by driekwartappel on Sunday July 16, 2017 @05:14AM (#14781229)
This looks like the minimal:

  class HelloWorld
  {
    static void Main()
    {
       System.Console.Write("Hello world!");
    }
  }
Try it online: https://tio.run/##Sy7WTc4vSv3/PzknsbhYwSM1Jyc/PL8oJ4WrmktBob...
Re:TIO: Try it online by pavelbr on Saturday July 15, 2017 @05:33PM (#14779098)
Re:TIO: Try it online by egor598 on Saturday July 15, 2017 @01:37PM (#14777852)
This works for me in TIO:

public class App { public static void Main(string[] args) { System.Console.WriteLine("Hello World"); } }