question

43829457 avatar image
0 Votes"
43829457 asked ryanchill edited

setup a project from github

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 ==========


vs-generaldotnet-cli
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
1 Vote"
ryanchill answered ryanchill edited

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.