3 ms·
I haven't touched .NET in well over a decade. Last time I tried, I felt like a chimpanzee strapped into the cockpit of an F-15. Everything was "deploy!" and "
by at_a_remove 3y ago
I haven't touched .NET in well over a decade. Last time I tried, I felt like a chimpanzee strapped into the cockpit of an F-15. Everything was "deploy!" and "endpoint for automatic upgrades" and "ENTERPRISE" and "web service."
Does .NET have any "write a small program that is only a CLI?" options? Or GUI instead of web interface? Something modest.
- ejb999 3y agoYes, it has all that - console applications with no GUI, GUI interfaces on the desktop as well as web interface - has pretty much everything if you know where to look.
- leonheld 3y agoAnd Visual Studio is probably one of the best if not the best IDEs out there.
- at_a_remove 3y agoMaybe it has gotten better. I found it way too much, but then I am writing Python in Notepad++. All I saw was far too many options and an assumption that you were Writing At Enterprise Scale.
- artimaeis 3y agoIf it was a whole decade ago it's hard to state how much the ecosystem has changed since then. Since 2014 they've released Community Editions of Visual Studio, with a lot more useful features and less restrictive licensing than the old Express editions. But if you're used to writing Python in Notepad++ I'd skip VS entirely. You can install the dotnet SDK and just keep using Notepad++. Here's literally everything to write a CLI app in .NET 7: A csproj file: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net7.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> </Project> A program.cs file: Console.WriteLine("Hello, World!"); Then open a terminal and navigate to the folder you put the files in and run `dotnet build`. Or just pass in the folder in the argument `dotnet build .\demo\demo.csproj`. Voila. A CLI executable is built in the .\bin\Debug directory.
- at_a_remove 3y agoIs there a book you would recommend that targets small-scale usage like mine? A CLI, a GUI, or maybe a Windows Service that fires off every so often. I have noticed someone in a previous job who wrote an application that somehow tied itself to IIS despite not having any web site needed as a front end and found that somewhere between baffling (was there something I just wasn't getting? Is this how things are done now?) and intimidating (wow, that's a lot of infrastructure for something so small). I'm looking for something which might target the IDE and little tips like the you have helpfully included.
- barryrandall 3y agoIf you're willing to run Windows.
- donny2018 3y agoAnd if you are not, there is Rider which is just as good if not better than Visual Studio.
- leeman2016 3y agoUsed to be, in my opinion. Specially pre-2015. It has become buggy, slow and lacking features ever since. And let’s not get started with its monstrous setup/installer.
- Metasyntactic 3y agoHi there! I'm a developer on the .Net team, and I heavily work on our IDE offerings. You can absolutely write a small program that is only a CLI, and our tooling is heavily tailored to make that a great experience. First off, you don't need to use an IDE for this at all (if you don't want to). You can just do `dotnet new ...` from the command line to spit out what is needed to do CLI development. If you do want to use an IDE, there are many choices available. First party options include Visual Studio itself (which has varying skus depending on what you're interested in). For just CLI development, the Community sku would work great. Then there is VSCode, which has both the open-source "C# Extension" (also built by us), and the closed-source add-on "DevKit" which enhances that further with more features". Regardless of which environment you use, writing a CLI is extremely simple, and the language and environment cater to it. A simple 'Hello World' for C# literally is just: Console.WriteLine("Hello World!"); And you can grow on that as you want to flesh out whatever your CLI needs to do. If you're interested in doing anything web/server related, then ASP.NET Core also fits into this very simply, allowing you to stand up a web server from your CLI app trivially. We def want .Net, including the language, runtime, and tooling to scale all the way from these sorts of experiences to the "enterprisey" space, in a clean and consistent fashion. If you do run into issues with any of the above, def let us know. You can see all the work we do in .Net over at github.com/dotnet/... Including what's being worked on now, and what we're continuing to invest in for future releases. Thanks!
- at_a_remove 3y agoThat's great to know! You may not know this, but ESRI is more or less the Microsoft of GIS (Geographic Information Systems). While they largely settled on Python, some of the newer "add-ins" for ArcGIS Pro rely on .NET, instead. As such, I thought it would be a good idea to begin looking into .NET, C#, and the like to see if I could develop some add-ins myself. I'm one of those solo "dark matter" developers who ends up writing middleware, custom ETLs, and such that almost nobody will ever see and I had begun to despair of finding tooling for "the little guy." I will look into the SKUs you mentioned, it gives me some hope.
- smarx007 3y ago.NET always had simple console-only apps (that's what I started with more than 15 years ago). Now there is even a 'dotnet' CLI command. With first-class VS Code dev support and Linux support for SDK/runtime, you don't even need Windows or Visual Studio IDE to get started.
- smarx007 3y agoGood starting libs for CLI development: https://learn.microsoft.com/en-us/dotnet/standard/commandline/ https://learn.microsoft.com/en-us/dotnet/standard/commandlin... https://github.com/Tyrrrz/CliWrap https://github.com/Tyrrrz/CliWrap