News

Q&A with Jeremy Clark: Using the CLI in .NET Core

".NET Core is the future of .NET. So let's get comfortable with the creating, running, and testing applications using the command-line interface," says developer educator Jeremy Clark.

In anticipation of Clark's upcoming presentation on using the CLI with .NET Core at the Live!360 conference in Orlando (Nov. 17-22), we caught up with him to learn about his favorite .NET Core features, quirks to look out for and more.

What is your absolute, hands-down, absolute No. 1 favorite feature/capability of .NET Core?

"I love the cross-platform capability of .NET Core. It opens up new opportunities for development."

Jeremy Clark, Developer Educator, JeremyBytes.com

I love the cross-platform capability of .NET Core. Within a few minutes, I can start writing, compiling, and running C# on macOS. And I can deploy and run services on Linux containers. It opens up new opportunities for development.

What is No. 2? ;-)
"I really like the Kestrel server that ships with .NET Core. This is a built-in web server that automatically starts when you run a web application or web service. There is no more dealing with IIS Express or configuring IIS on a machine. I primarily work on the front end of applications, so being able to quickly spin up a test service has had a huge impact in my world.

What is No. 3?
I couldn't leave out the support for WPF that we get with .NET Core 3.0. I'm a huge fan of XAML and WPF, so I'm really happy to see WPF moving forward. WPF features are not cross-platform, but we get the advantage of speed improvements, easier project system, and C# 8 features.

What's the best way for developers to get used to using a CLI on a regular basis?
The best way to get comfortable with the CLI is to use it. By creating projects, adding NuGet packages, and referencing other packages, we get an idea of how the project system works and how it differs from the .NET Framework environment that we are used to. In real life, I tend to mix-and-match, sometimes using the CLI and sometimes using the Visual Studio tools. It's great to have both options available.

Are there any top quirks in .NET Core that developers should know about?
You will run across minor things that will take some research. For example, the default value for "Process.StartInfo.UseShellExecute" changed in .NET Core. This caused me a bit of pain. On the other hand, Task in .NET Core has a new "IsCompletedSuccessfully" property that makes things less confusing compared with Task in .NET Framework. If you run into something strange, first take a look at the documentation; this will often give you the answer.

What feature of .NET Core are most developers not aware of?
When you add a file to a project folder, it automatically becomes part of the project. For developers coming from .NET Framework, we are used to explicitly adding files to projects in Visual Studio. But with .NET Core, we just create a new file, and it is part of the project. And if we need to, we can still exclude files from a project.

What limitation of .NET Core do developers most need to understand?
There is no path forward for ASP.NET WebForms applications. WebForms will continue to work on .NET Framework and run in our current environments, so there's no need to panic. But we need to start thinking about the future when it comes time to overhaul our applications.

Is there anything else ahead of your session "Get Comfortable with .NET Core and the CLI" that you'd like to share with our readers?
.NET Core is the future of .NET. Many C# 8 features are not available in .NET Framework. We can continue to develop our .NET Framework applications in their existing environments, so there's no need to panic. But to move forward, we need to get comfortable with .NET Core.

About the Author

Becky Nagel serves as vice president of AI for 1105 Media specializing in developing media, events and training for companies around AI and generative AI technology. She also regularly writes and reports on AI news, and is the founding editor of PureAI.com. She's the author of "ChatGPT Prompt 101 Guide for Business Users" and other popular AI resources with a real-world business perspective. She regularly speaks, writes and develops content around AI, generative AI and other business tech. Find her on X/Twitter @beckynagel.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube