Solution
In this section, we will develop the Tic-Tac-Toe game in the ASP.NET Core 2.0 web app, using SignalR Core. We will follow a step-by-step approach and use Visual Studio 2017 as the primary IDE, but will list the steps needed while using the Visual Studio Code editor as well. Let's do the project setup first and then we will dive into the coding.
Project setup
Create a new ASP.NET Core 2.0 MVC app named TicTacToeGame
, like we did in the Creating a simple running code section in Chapter 1, Getting Started.
With this, we will have a basic working ASP.NET Core 2.0 MVC app in place. However, to leverage SignalR Core in our app, we need to install SignalR Core NuGet and the client packages.
To install the SignalR Core NuGet package, we can perform one of the following two approaches in the Visual Studio IDE:
- In the context menu of the
TicTacToeGame
project, click onManage NuGet Packages
. It will open theNuGet Package Manager
for the project. In theBrowse
section, search for theMicrosoft...