This project is a demonstration application created for the Refactor and Optimize Code with GitHub Copilot Pluralsight course by Mark Heath. It is not designed as a "best practices" example, but simply to contain some demo code that can be used as a starting point for using Copilot to perform refactoring.
Note that Git tags have been used for some of the checkpoints before and after various demos in the course, so use those to get to a specific point in time..
Before you begin, ensure you have the following installed:
- .NET SDK 9.0
- Visual Studio or Visual Studio Code with C# extension
Also, in order to try out refactoring ideas, make sure you have the GitHub Copilot extension installed. You can download it from GitHub Copilot.
To build the project, navigate to the GloboticketWeb directory in the terminal and run the following command:
dotnet buildAlternatively, you can build the project using Visual Studio. The project file is GloboticketWeb.csproj.
To run the application, navigate to the GloboticketWeb directory and execute:
dotnet runOr, run the application from within Visual Studio. The main program file is Program.cs.
The application will be accessible at https://localhost.
To run the unit tests, navigate to the GloboticketWeb.Tests directory and run:
dotnet testAlternatively, you can run the tests using the Test Explorer in Visual Studio. The test project file is GloboticketWeb.Tests.csproj.
This project uses LibMan to manage client-side libraries. If the libraries are not included in your downloaded version, you can restore them using the following steps:
If you don't have LibMan installed, you can install it using the following command:
dotnet tool install -g Microsoft.Web.LibraryManager.Cli- Open the project in Visual Studio.
- Right-click on the GloboticketWeb project in the Solution Explorer.
- Select Restore Client-Side Libraries.
Alternatively, you can restore the libraries via the command line:
- Navigate to the GloboticketWeb directory.
- Run the following command:
dotnet libman restore
This will restore the libraries defined in the libman.json file.