2

I am trying to run microsoft's example repository https://github.com/dotnet/AspNetCore.Docs

I successfully cloned the project. I am having trouble running it out of the box. Specifically, I am trying to run the Localization example project by running program.cs inside it. I cloned the whole repository and used visual studio to "Open Folder" and selected the Localization folder. I get a build error it says project.assets.json is missing please run a nuget restore when I try to run program.cs (in the localization example project). I can't do that because the nuget package manager is missing (I have access to the package manager console though) and I don't have a solution file to pass as a parameter to dotnet restore  from the console. What should I do to fix it?

Here is the specific part of the repository i am trying to run https://github.com/dotnet/AspNetCore.Docs/tree/master/aspnetcore/fundamentals/localization/sample/3.x/Localization

1 Answers1

2

project.assets.json missing please run a nuget restore visual studio 2019

When you download the microsoft's example repository, Unzip the file.

1) Open VS2019 IDE, use Open a project or Solution menu to open such file xxx\aspnetcore\fundamentals\localization\sample\3.x\Localization\Localization.csproj directly.

Actually, opening xxx.csproj or xxx.sln can show all the contents of the item in the Solution Explorer in its entirety.

2) build the project directly or just right-click on the solution-->Restore NuGet Packages.

enter image description here

Then you will build the Localization project successfully.

enter image description here

Mr Qian
  • 21,064
  • 1
  • 31
  • 41