Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Tools and Skills for .NET 8
Tools and Skills for .NET 8

Tools and Skills for .NET 8: Get the career you want with good practices and patterns to design, debug, and test your solutions 

eBook
Mex$550.99 Mex$787.99
Paperback
Mex$688.99 Mex$984.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Table of content icon View table of contents Preview book icon Preview Book

Tools and Skills for .NET 8

Making the Most of the Tools in Your Code Editor

This chapter is about going beyond using the basic file management and editing tools in your code editor. We will look at the three most common code editors or interactive development environments (IDEs): Visual Studio 2022, Visual Studio Code, and JetBrains Rider. After introducing them, I will mostly refer to them by shorter names: Visual Studio, Code, and Rider.

You only need to read the sections for the code editor that you use, although I recommend becoming familiar with them all while you are taking the opportunity to learn new things.

This chapter covers the following topics:

  • Introducing common tools and features
  • Tools in Visual Studio 2022
  • Tools in Visual Studio Code
  • Decompiling .NET assemblies
  • Custom project and item templates

Introducing common tools and features

Common tools and features in all code editors and IDEs include the following:

  • Refactoring features
  • Code snippets
  • Editor configuration
  • AI companions

Let’s describe each of these tools and features in more detail so that you understand the concepts, and then, in later sections, you can see how specific code editors implement those features.

Refactoring features

Refactoring is the process of modifying the internal structure of existing computer code without changing its external behavior. Most code editors and IDEs expose their refactoring features via their Edit menu and context (right-click) menus. But why would you want to spend effort rewriting code if there is no external effect?

The expected benefits are improved code readability and reduced complexity. In other words, you are investing in the future. Whoever must maintain the code should be able to do so with reduced effort and the likelihood...

Tools in Visual Studio 2022

Visual Studio contains many useful built-in tools including ones to implement the concepts you learned about earlier in this chapter.

Visual Studio vNext

At the time of writing, Visual Studio is version 17.10 and branded as Visual Studio 2022. I expect the next major version of Visual Studio to be version 18.0 and be branded as Visual Studio 2025. It is likely to be released in November 2024, after this book is published. Visual Studio 2025 will have mostly the same features as the 2022 edition although the user interface might move things around a bit. By default, all links in this book for Visual Studio will go to the current version, so to the 2022 version until the 2025 version is released. To force a link to go to the older version, append ?view=vs-2022 to the end of the link.

Refactoring features

Visual Studio has dozens of refactoring features, aka refactorings, to modify code to make it easier to maintain, understand...

Tools in Visual Studio Code

First, you should become familiar with Code’s keyboard shortcuts. There are convenient single-page PDF files that you could print out on these keyboard shortcuts, one for each of the common operating systems, Windows, macOS, and Linux, and they are found at the following link: https://code.visualstudio.com/docs/getstarted/keybindings#_keyboard-shortcuts-reference.

When you have multiple files (tabs) open simultaneously, you can use Alt + Left Arrow and Alt + Right Arrow to navigate between them. You can also use Ctrl + Tab and Ctrl + Shift + Tab (reverse order).

Refactoring features

Many of Code’s refactoring features are activated by pressing Ctrl + Shift + R.

Code has a subset of refactoring commands, some of which are shown in the following list:

  • Rename symbol (F2): Renaming is a common operation related to refactoring source code, and all instances of the symbol across all files will be renamed.
  • Extract...

Decompiling .NET assemblies

One of the best ways to learn how to code for .NET is to see how professionals do it. Most code editors have an extension for decompiling .NET assemblies. Visual Studio and Code can use the ILSpy extension. JetBrains Rider has a built-in IL Viewer tool.

Good Practice

You could decompile someone else’s assemblies for non-learning purposes, like copying their code for use in your own production library or application, but remember that you are viewing their intellectual property, so please respect that.

Creating a console app to decompile

Let’s create a console app that we can then decompile:

  1. Use your preferred code editor to add a new Console App / console project named DotNetEverywhere to the Chapter02 solution. Make sure you target .NET 8.
  2. Modify the project file to statically import the System.Console class in all C# files.
  3. In Program.cs, delete the existing statements, and then add a...

Custom project and item templates

The .NET SDK comes with many project and item templates that can create a new project or item for you by calling the dotnet new command, for example, console, classlib, web, mvc, and blazor.

More Information

You can learn about the built-in project and item templates at the following link: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-new-sdk-templates.

One of the most efficient ways to improve your code editor experience is to create custom .NET project templates. These are recognized by all the code editors. You can create templates for entire projects or individual project items. They are distributed as NuGet packages (.nupkg files) and installed through the dotnet new install SDK command.

All project and item templates use the same principles and have similar contents. Both project and item templates contain the following items:

  • All the folders and files needed when the template is used, including...

Practicing and exploring

Test your knowledge and understanding by answering some questions, getting some hands-on practice, and exploring the topics covered in this chapter with deeper research.

Exercise 2.1 – Online-only material

The print book mostly covers Visual Studio and Code. For similar coverage of tools in Rider, you can read an online-only section at the following link: https://github.com/markjprice/tools-skills-net8/blob/main/docs/rider/ch02-tools.md.

To read a summary of recent improvements to Visual Studio, you can read the following article: https://devblogs.microsoft.com/visualstudio/visual-studios-full-year-in-review-2023/.

To read a summary of recent improvements to GitHub Copilot, you can read the following article: https://devblogs.microsoft.com/visualstudio/github-copilot-in-visual-studio-a-recap-of-2023/.

Developers are quickly embracing AI tools in their developer workflows, as you can see from the Stack Overflow Survey 2023 and the...

Summary

In this chapter, you learned:

  • About tools and features common to all code editors
  • How to use tools in Visual Studio
  • How to use tools in Code
  • How to decompile .NET assemblies for learning purposes
  • How to create a custom project template and use it to create a new project

In the next chapter, you will learn about Git, a popular source code control and management system.

Join our book’s Discord space

Read this book alongside other users, and the author himself.

Ask questions, provide solutions for other readers, chat with the author via Ask Me Anything sessions, and much more.

https://packt.link/TS1e

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Coverage of key .NET tools and skills including refactoring, source code management, debugging, memory troubleshooting, and more
  • Practical guidance on using code editors effectively, implementing best practices, and protecting data
  • Explore cutting-edge techniques like building intelligent apps, cloud native development with .NET Aspire, and Docker containerization

Description

Unlock the full potential of .NET development with Tools and Skills for .NET 8. Dive into source code management using Git and learn how to navigate projects while ensuring version control. Discover advanced debugging techniques and troubleshooting strategies to identify and resolve issues, and gain practical insights on documenting your code, APIs, and services, fostering project clarity and maintainability. Delve into the world of cryptography, ensuring confidentiality and integrity throughout your development lifecycle. Elevate your skills as you explore cutting-edge topics such as building intelligent apps using custom LLM-based chat services, mastering dependency injection, optimizing performance through testing, and Docker containerization. Harness the power of cloud-native development with .NET Aspire, unlocking the benefits of modern cloud platforms. With guidance on software architecture best practices, this book empowers you to build robust, scalable and maintainable applications. Advance your career with invaluable insights on job readiness and interview preparation, positioning yourself as a top-tier candidate in today's competitive job market. Whether you're a seasoned .NET professional or an aspiring developer looking to enhance your skills, this book is your ultimate companion on the journey to .NET mastery.

Who is this book for?

.NET professionals seeking to enhance their expertise, as well as aspiring developers aiming to advance their careers in the field. This book caters to individuals eager to master essential .NET tools, refine their development practices, explore advanced techniques and cutting-edge tools, and prepare themselves for job opportunities and interviews in the competitive landscape of .NET development

What you will learn

  • Make the most of code editor tools for efficient development
  • Learn advanced debugging techniques and troubleshooting strategies
  • Understand how to protect data and applications using cryptography
  • Build a custom LLM-based chat service
  • Discover how to master dependency injection
  • Optimize performance through benchmarking and testing
  • Delve into cloud-native development using .NET Aspire
  • Advance your career with advice on job readiness and interviews

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 30, 2024
Length: 778 pages
Edition : 1st
Language : English
ISBN-13 : 9781837633685
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning

Product Details

Publication date : Jul 30, 2024
Length: 778 pages
Edition : 1st
Language : English
ISBN-13 : 9781837633685
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Mex$85 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Mex$85 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Mex$ 2,051.98
Apps and Services with .NET 8
Mex$1025.99
C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals
Mex$1025.99
Total Mex$ 2,051.98 Stars icon

Table of Contents

21 Chapters
Introducing Tools and Skills for .NET Chevron down icon Chevron up icon
Making the Most of the Tools in Your Code Editor Chevron down icon Chevron up icon
Source Code Management Using Git Chevron down icon Chevron up icon
Debugging and Memory Troubleshooting Chevron down icon Chevron up icon
Logging, Tracing, and Metrics for Observability Chevron down icon Chevron up icon
Documenting Your Code, APIs, and Services Chevron down icon Chevron up icon
Observing and Modifying Code Execution Dynamically Chevron down icon Chevron up icon
Protecting Data and Apps Using Cryptography Chevron down icon Chevron up icon
Building an LLM-Based Chat Service Chevron down icon Chevron up icon
Dependency Injection, Containers, and Service Lifetime Chevron down icon Chevron up icon
Unit Testing and Mocking Chevron down icon Chevron up icon
Integration and Security Testing Chevron down icon Chevron up icon
Benchmarking Performance, Load, and Stress Testing Chevron down icon Chevron up icon
Functional and End-to-End Testing of Websites and Services Chevron down icon Chevron up icon
Containerization Using Docker Chevron down icon Chevron up icon
Cloud-Native Development Using .NET Aspire Chevron down icon Chevron up icon
Design Patterns and Principles Chevron down icon Chevron up icon
Software and Solution Architecture Foundations Chevron down icon Chevron up icon
Your Career, Teamwork, and Interviews Chevron down icon Chevron up icon
Epilogue Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Most Recent
Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(12 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Most Recent

Filter reviews by




Giuseppe Nov 09, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Amazing!!!
Subscriber review Packt
Foster Haines Oct 15, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book presents a lot of material in a great format to expand your .NET skills into a Senior role. The concepts vary from intermediate to advanced topics. The coding examples and GitHub repo allow you read and debug the code as necessary. The list of tools to perform specific advanced skills were a great add to the book. Knowing what is available for accomplishing a variety of testing scenarios was very valuable. I have not previously explored security testing (usually handled by another team in my career) . This book is ideal for folks looking to move up in their career using .NET.
Amazon Verified review Amazon
Jonathan Reeves Oct 15, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This was a great book on how to increase my skills even further with C# and .NET. I was able to learn how to make use of advanced tool development and utilize technologies such as ChatGPT to build an LLM of my own. That was by far best project for me to see how to use C# and .NET to create my own LLM vs using Python.If you are wondering what kind of applications you can build outside of web or desktop development with .NET and C# this book will walk you through building quite a few.
Amazon Verified review Amazon
Maciej Oct 03, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Feefo Verified review Feefo
Ross Sep 23, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I initially posted a negative review due to a few typos, but I have changed my mind. This book is really good, and I recommend it. It got me a lot more conformable with the .Net CLI and find new capabilities of the CLI that I have never used or was aware of. There are quite a few subjects in here that I was dying to find in a .Net book. It is well worth the money.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.