Running or Downloading Contoso University from GitHub

Dean Everhart 1,496 Reputation points
2023-03-22T14:33:39.34+00:00

I am trying to download a completed copy of the Contoso University Demo from GitHub.

cu_final is probably the copy I want.

User's image

I open cu_final and I see the familiar .net file structure for a project. I am encouraged.

User's image

User's image

When I hit the <> Code button the contents shown change to something unfamiliar but maybe the project is contained within one of the subfolders...

User's image

User's image

I chose both to open with Visual Studio, which downloaded the file, and to download as a zip file. Result was the same. Visual Studio message requested to find startup item to run the project. A search of folder came up with no .sln items.

User's image

I tried a subfolder...seeing a simplified project file structure, no .sln item.

Questions:

  1. Is this the right github location from which to download the Contoso University demo?
  2. What am I misunderstanding / doing wrong?

User's image

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,161 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 55,686 Reputation points
    2023-03-22T15:57:58.7866667+00:00

    the AspNetCore.Docs repo contains many samples. the Code<> lets you download the complete repo. once downloaded you can open the solution file in folder.

    GitHub only supports downloading or cloning the complete repo. other tools allow getting a portion.

    using the website downgit you can just download a folder to zip file:

    https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/data/ef-mvc/intro/samples/cu-final

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Michael Taylor 48,046 Reputation points
    2023-03-22T15:11:48.03+00:00

    I'm not really sure how you got into that structure to begin with. It might be useful to tells us how you got there. But nevertheless if you downloaded and extracted a zip file of the repo (or used clone to clone the repo) and then go to the cu-final folder the project file is there. Open Visual Studio and select the option to open a project. Then navigate to the .csproj file and select it to open the project in VS. You should then be able to compile and run it.

    Alternatively use the file system to navigate to that same folder and then double click the .csproj file. Assuming your VS defaults haven't been changed then it should open in the Visual Studio. Either approach should work fine.

    0 comments No comments