Dotnet test exit code 1

Currently, my dotnet test command points on the .csproj of my test project. I keep getting exit code 1 with no other details. Can anyone help?

language: csharp
solution: LOG330-Lab.sln
mono: none
dist: trusty
os: osx
dotnet: 2.0.0
install:

  • dotnet restore
    script:
  • dotnet test Log330-Lab/LOG330-Lab/LOG330-LabTests/LOG330-LabTests.csproj

https://travis-ci.com/Mikaelsauriol5/Log330-Lab

@Joshua-Anderson @BanzaiMan can any of you help? This is the output:

The command “dotnet test Log330-Lab/LOG330-Lab/LOG330-LabTests/LOG330-LabTests.csproj --no-build” failed and exited with 1 during .

I’m sorry, but we can’t read your code. I can read logs, but not everyone can.

Please read the logs and messages carefully. The last failing build says this:

$ dotnet restore
?1h=?1h=?1h=/usr/local/share/dotnet/sdk/2.0.0/NuGet.targets(216,5): warning MSB3202: The project file "/Users/travis/build/Mikaelsauriol5/Log330-Lab/LOG330-LabTests/LOG330-LabTests.csproj" was not found. [/Users/travis/build/Mikaelsauriol5/Log330-Lab/LOG330-Lab.sln]
/usr/local/share/dotnet/sdk/2.0.0/NuGet.targets(216,5): warning MSB3202: The project file "/Users/travis/build/Mikaelsauriol5/Log330-Lab/LOG330-Lab/LOG330-Lab.csproj" was not found. [/Users/travis/build/Mikaelsauriol5/Log330-Lab/LOG330-Lab.sln]
/Users/travis/build/Mikaelsauriol5/Log330-Lab/LOG330-LabTests/LOG330-LabTests.csproj : warning NU1503: Skipping restore for project '/Users/travis/build/Mikaelsauriol5/Log330-Lab/LOG330-LabTests/LOG330-LabTests.csproj'. The project file may be invalid or missing targets required for restore. [/Users/travis/build/Mikaelsauriol5/Log330-Lab/LOG330-Lab.sln]
/Users/travis/build/Mikaelsauriol5/Log330-Lab/LOG330-Lab/LOG330-Lab.csproj : warning NU1503: Skipping restore for project '/Users/travis/build/Mikaelsauriol5/Log330-Lab/LOG330-Lab/LOG330-Lab.csproj'. The project file may be invalid or missing targets required for restore. [/Users/travis/build/Mikaelsauriol5/Log330-Lab/LOG330-Lab.sln]
/usr/local/share/dotnet/sdk/2.0.0/NuGet.targets(102,5): warning : Unable to find a project to restore! [/Users/travis/build/Mikaelsauriol5/Log330-Lab/LOG330-Lab.sln]
K$ dotnet test Log330-Lab/LOG330-Lab/LOG330-LabTests/LOG330-LabTests.csproj --no-build
?1h=MSBUILD : error MSB1009: Project file does not exist.

If this is for your course work, please consult your instructor(s).

What I dont get is these files (.csproj) are in my solution. Where does travis look for them?

I believe you are overriding the defaults described in Building a C#, F#, or Visual Basic Project - Travis CI. You are responsible for the dotnet test command that’s failing, and you are specifically specifying the path to the *.csproj file. The file path is initially relative to the repository root; so unless you change working directory, it should be “Log330-Lab/LOG330-Lab/LOG330-LabTests/LOG330-LabTests.csproj” in the repository.