MSBuild Not working in Jenkins But It is working in My Local Command Prompt

mosesalfred pilla 1 Reputation point
2022-03-28T06:35:45.757+00:00

Hi, I am Trying to build a CI Pipeline

At Build Step This is the error I am getting when I build through Jenkins "C:\ProgramFiles\dotnet\sdk\5.0.405\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file 'C:\ProgramData\Jenkins.jenkins\workspace\DevOpsAPI\src\TimeTracker.DAL\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\ProgramData\Jenkins.jenkins\workspace\DevOpsAPI\src\TimeTracker.DAL\TimeTracker.DAL.csproj]"

But while using command prompt "dotnet build" command it is working

Please provide me solution to fix this Issue !!!!

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,248 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,001 questions
{count} votes