Build .NET Core 2.0 on Travis CI

1.7k Views Asked by At

I migrated my tests and demos projects to .NET Core 2.0. I tried to build this project but I have this error:

/home/travis/build/MarkKhromov/The-Log/TheLog.Demos/TheLog.Demos.csproj.metaproj : error MSB4025: The project file could not be loaded. Could not find file '/home/travis/build/MarkKhromov/The-Log/TheLog.Demos/TheLog.Demos.csproj.metaproj

I wrote this in the .travis.yml:

language: csharp
mono: none
dotnet: 2.0.0
script:
  - dotnet restore
  - dotnet build ./TheLog.sln
  - dotnet test ./TheLog.Tests/

What did I do wrong? Locally the build is fine.

1

There are 1 best solutions below

1
Mark Khromov On BEST ANSWER

I managed to solve this problem as follows: I wrote in the .travis.yml:

language: csharp
mono: none
dotnet: 2.0.0
script:
  - dotnet restore
  - dotnet build ./TheLog/
  - dotnet build ./TheLog.Demos/
  - dotnet test ./TheLog.Tests/

But for me it still remains a mystery why these errors occurred when I tried to compile a solution (.sln) file