© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
2 replies
willCodeforFood

MSTest dotnet Test failing from the command prompt

I have a TestMethod that clones a git repo and then performs some operations on the folder.

When I run this test from VS test explorer, I do not have issues, However, when i run the same test from the command line using dotnet Test I get an error. I am assuming its because the enivornment im running that from does not have Git installed so it failed.

After researching online, the only solution I got was to add the git.exe file to my test project and a make sure to set the Copy to Output Directory to Copy if newer or Copy always and then use the that file path in my ProcessStartInfo method but that didnt work either. Got the error error launching git: The system cannot find the path specified.

What else can I do?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Dotnet webapi test failing on GitHub Workflow
C#CC# / help
12mo ago
❔ Dotnet Command
C#CC# / help
3y ago
Dotnet ef command
C#CC# / help
3y ago
dotnet test app.cs
C#CC# / help
4mo ago