How to run script for both .NET and .NET Core at the same time?

Hello! I am trying to run the following command in my repository:

language: csharp
solution: "Sudoku.sln"
dist: trusty
mono: none
dotnet: 2.1.502

install:
  - dotnet restore 
script:
  - dotnet build 
  - dotnet test 

The problem is, that my projects are on .NET, except fro a test project which is on .NET Core. Should I migrate all to .NET Core or is there a way to change this so that it builds with both .NET or Core?

You can have two jobs, one for each, with different scripts if required.

https://docs.travis-ci.com/user/build-stages/#how-to-define-build-stages