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

Subscribe on YouTube