Dual Target .net core and .net framework error

I’m trying to dual target .net core and .net framework. I am getting a strange error. Here is the path to my yml file: https://github.com/jjxtra/ExchangeSharp/blob/master/.travis.yml

And the build error:

Build started, please wait…

/usr/share/dotnet/sdk/2.2.102/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework “.NETFramework,Version=v4.7.2” were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/home/travis/build/jjxtra/ExchangeSharp/ExchangeSharpConsole/ExchangeSharpConsole.csproj]

/usr/share/dotnet/sdk/2.2.102/Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework “.NETFramework,Version=v4.7.2” were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [/home/travis/build/jjxtra/ExchangeSharp/ExchangeSharp/ExchangeSharp.csproj]

Build completed.

Any ideas? I don’t care to test the .net framework or mono, so if there is a way to ignore it entirely that would be ideal.

I’m not super familiar with the .Net toolchain but I believe you’ll need to use/reference Mono to be able to build your project on Travis CI.

Could you check this StackOverflow answer that offers some way to do this on non-Windows environment and let us know if it helps?