Hi Lemmings, I wondered if anyone had successfully created a C# project that uses winforms on linux.
I just can’t figure out how to do it.
I use Arch and have full dotnet 6 and 8 packages; but I can’t dotnet new winforms as the template seems to not exist.
I also have installed mono and monodevelop installed, but even the simplest solution (Console App) can’t load correctly (currently I have /usr/share/dotnet/sdk/8.0.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.Shared.targets(152,5) : error MSB4062: The "CheckForImplicitPackageReferenceOverrides" task could not be loaded from the assembly /usr/share/dotnet/sdk/8.0.102/Sdks/Microsoft.NET.Sdk/targets/../tools/net472/Microsoft.NET.Build.Tasks.dll. Invalid Image Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. but there were different similar errors before, these errors.
I don’t really want to boot up a VM every time I have to code on that project, but I’m starting to feel desperate about this.

TLDR: How does one create and work on a WinForms C# project with linux ? Any suggestions are welcome

Some clarifications for future readers :

  • It is for a school group project; winforms in imposed, which sadly won’t let me go with Avalonia
  • eveninghere@beehaw.org
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    edit-2
    9 months ago

    Not talking about winforms in that quoted part. I thought that was obvious.

    I don’t buy the second paragraph, especially as the phrasing is so loose it can mean anything.

    Edit: overall I think this will result in a typical internet conversation that turns into “lmao that’s the weakest argument I’ve ever seen!” “you’re so pathetic!” etc. etc.

    • Lucky@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      9 months ago

      Dotnet core (now just dotnet) was a full rebuild of the framework specifically for cross platform support so they could get more enterprise cloud hosting on azure, running everything on Linux

      Modern C# is built for first class Linux support for everything except UI

      • eveninghere@beehaw.org
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        edit-2
        9 months ago

        Nope. There are nuggets that lack ARM binaries, for example. And I’ve had enough troubles on macOS therefore.