Reader small image

You're reading from  Apps and Services with .NET 8 - Second Edition

Product typeBook
Published inDec 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781837637133
Edition2nd Edition
Languages
Tools
Right arrow
Author (1)
Mark J. Price
Mark J. Price
author image
Mark J. Price

Mark J. Price is a Microsoft Specialist: Programming in C# and Architecting Microsoft Azure Solutions, with over 20 years' experience. Since 1993, he has passed more than 80 Microsoft programming exams and specializes in preparing others to pass them. Between 2001 and 2003, Mark was employed to write official courseware for Microsoft in Redmond, USA. His team wrote the first training courses for C# while it was still an early alpha version. While with Microsoft, he taught "train-the-trainer" classes to get other MCTs up-to-speed on C# and .NET. Mark holds a Computer Science BSc. Hons. Degree.
Read more about Mark J. Price

Right arrow

Building a .NET console app client

You have just seen a .NET service hosting a SignalR hub, and a JavaScript client exchanging messages with other clients via that SignalR hub. Now, let’s create a .NET client for SignalR.

Creating a .NET client for SignalR

We will use a console app, although any .NET project type would need the same package reference and implementation code:

  1. Use your preferred code editor to add a new project, as defined in the following list:
    • Project template: Console Application / console
    • Solution file and folder: Chapter11
    • Project file and folder: Northwind.SignalR.Client.Console
  2. Add a package reference for the ASP.NET Core SignalR client and a project reference for Northwind.Common, treat warnings as errors, and globally and statically import the System.Console class, as shown in the following markup:
    <ItemGroup>
      <PackageReference Include="Microsoft.AspNetCore...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Apps and Services with .NET 8 - Second Edition
Published in: Dec 2023Publisher: PacktISBN-13: 9781837637133

Author (1)

author image
Mark J. Price

Mark J. Price is a Microsoft Specialist: Programming in C# and Architecting Microsoft Azure Solutions, with over 20 years' experience. Since 1993, he has passed more than 80 Microsoft programming exams and specializes in preparing others to pass them. Between 2001 and 2003, Mark was employed to write official courseware for Microsoft in Redmond, USA. His team wrote the first training courses for C# while it was still an early alpha version. While with Microsoft, he taught "train-the-trainer" classes to get other MCTs up-to-speed on C# and .NET. Mark holds a Computer Science BSc. Hons. Degree.
Read more about Mark J. Price