setup a project from github

Al-Asadi, Bassam 21 Reputation points
2021-10-04T12:13:02.513+00:00

Hi, I'm totally newbie to C# I have this repo dotnet-csharp.html and I want to run it locally using Microsoft Studio 2019, but I have no Idea what is really required from me in order to make it work?

Error message from output:


1>------ Build started: Project: SaaS.SDK.Client.DataAccess, Configuration: Debug|AnyCPU ------
1>C:\Program Files\dotnet\sdk\5.0.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file 'C:\Users\bassam.al-asadi\Source\Repos\Microsoft-commercial-marketplace-SaaS-offer-billing-SDK\src\SaaS.SDK.Client.DataAccess\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
2>------ Build started: Project: SaaS.SDK.Provisioning.Services, Configuration: Debug|AnyCPU ------
2>C:\Program Files\dotnet\sdk\5.0.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file 'C:\Users\bassam.al-asadi\Source\Repos\Microsoft-commercial-marketplace-SaaS-offer-billing-SDK\src\SaaS.SDK.Services\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
3>------ Build started: Project: SaaS.SDK.PublisherSolution, Configuration: Debug|AnyCPU ------
3>C:\Program Files\dotnet\sdk\5.0.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file 'C:\Users\bassam.al-asadi\Source\Repos\Microsoft-commercial-marketplace-SaaS-offer-billing-SDK\src\SaaS.SDK.PublisherSolution\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.

==========
Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,875 questions
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
328 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 27,031 Reputation points Microsoft Employee
    2021-10-04T13:00:02.717+00:00

    Hi @AlAsadiBassam-4916,

    I'm assuming you ran git clone https://github.com/Azure/Microsoft-commercial-marketplace-SaaS-offer-billing-SDK.git -b main --depth 1 as per instructed. The error message is related to a missing file project.assets.json that lists all dependencies of the projects inside the solution. To fix it, from a command line pathed into the solution directory, you can run dotnet restore. This will restore the nuget packages for all the projects in the solution. You can also perform this inside Visual Studio by right clicking on the solution and selected Restore Nuget Packages from the context menu. You can read more about the functionality on Nuget Package Restore

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful