'What's the different when build a project through the msbuild and dotnet on jenkins?

When i make a proj in vs 2019 by using .net core 3.1, and it will all be ok when both build in cmd using msBuild or dotnet and also the nunit3-console.exe test for that proj is also success, but when i using them in jenkins, the msbuild cmd can build ok,but it will failed for nunit3-console.exe Testing (both of them is build a .sln file)

this is a dotnetBuild and then run nunit test
this is a msbuild and then run nunit test
this is a config for my proj

using NUnit.Framework;

namespace TestProject1
{
    public class Tests
    {
        [SetUp]
        public void Setup()
        {
        }

        [Test]
        public void Test1()
        {
            Assert.Pass();
        }
    }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source