C# C# Streams and Data Processing Serialization Top Ten Scorers

I downloaded zip file, extracted and created new project in Visual Studio, added the files, but I'm getting errors

I downloaded the zipfile from the Top Ten Scorers video in the C# Streams and DataProcessing class. Then I extracted all files. I opened Visual Studio Community and created a new project. Then I added existing files from the extracted files I downloaded. Now I'm getting red squiggly lines under "using Newtonsoft.Json, and under the Solution name, project name, Player.cs, and Program.cs in the Solution Explorer window. The error says: "The Type or namespace name "Newtonsoft could not be found (are you missing a using directive or assembly reference?)"

I don't know what this means, or what I should do.

1 Answer

Allan Clark
Allan Clark
10,805 Points

The project is likely missing references to NuGet packages, you should be able to find them using the NuGet package manager. However, I'd suggest a different approach.

The Project Files zip that you download from that page is a full project, complete with all the references required. I would simply go to where you extracted the files, and double click the 'SoccerStats.sln' file. This is a Visual Studio Solution file, it should open in VS with everything you need.

Hope this helps, Happy Coding!!