Search icon CANCEL
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
€19.99 €28.99
Paperback
€24.99 €35.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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
Estimated delivery fee Deliver to Finland

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

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 : 9781837635207
Languages :
Concepts :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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
Estimated delivery fee Deliver to Finland

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.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
€189.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 €5 each
Feature tick icon Exclusive print discounts
€264.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 €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 82.98
Apps and Services with .NET 8
€37.99
C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals
€44.99
Total 82.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

Top Reviews
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
Top Reviews

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
Maciej Oct 03, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Feefo Verified review Feefo
Alvin Ashcraft Sep 05, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I've had time to browse through an eBook copy of Mark Price's new book for .NET developers while I wait for the print copy to arrive. I'm already a fan of Mark's 'Modern Cross Platform Development' and 'Apps and Services' titles for .NET 8.This book focuses more on the tools and practices that turn a .NET coder into a well-rounded .NET developer. He covers so much that it's hard to write a short review that does the book justice. The book starts off with the basics of getting your dev environment ready, then it covers topics like git workflows, debugging tools in Visual Studio, logging, diagrams (I love Mermaid), dependency injection, unit testing, perf testing, and he even gets into the new stuff in .NET Aspire.I liked the topics toward the end of the book about design patterns (and how they apply to .NET development), architecture practices, and moving your career forward. Each chapter has really helpful (and practical) exercises - don't skip them!If you're a new to mid-level .NET developer and want to move ahead to senior dev or architect roles, this book is a really nice place to start. Go check out the table of contents, there's so much here!
Amazon Verified review Amazon
Salman Farsi Aug 08, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Mark J. Price's "Tools and Skills for .NET 8" is an invaluable resource for any .NET developer looking to enhance their skills and knowledge. The book is well-structured, covering a wide range of topics essential for professional development in the .NET ecosystem.- Comprehensive Coverage: The book delves into various tools and skills, from source code management using Git to cloud-native development with .NET Aspire. Each chapter is packed with practical hands-on walkthroughs, making complex concepts accessible and easy to understand.- Practical Approach: Mark's experience shines through in the practical exercises and real-world examples provided throughout the book. This approach ensures that readers can immediately apply what they've learned in their projects.- Focus on Modern .NET: The book is up-to-date with the latest advancements in .NET 8, including new features and best practices. This makes it a relevant and timely resource for developers aiming to stay current in their field.- Supportive Resources: The accompanying GitHub repository and additional online materials provide excellent support for readers, offering solutions to exercises and further reading to deepen understanding.Overall, "Tools and Skills for .NET 8" is a must-read for any .NET developer seeking to advance their career and master the tools and skills necessary for professional success. Mark J. Price has once again delivered a top-notch resource that is both informative and engaging. Highly recommend for beginners and export .NET Developers.
Amazon Verified review Amazon
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

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela