ok so I have change to .net 5 because i only used .net 6 because it was downloaded. But I still get an error about .net 5 so where may the problem be now?
/usr/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1193,5): error MSB3644: The reference assemblies for .NETFramework,Version=v5.0.401 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [/home/travis/build/zaze06/TextGame/Game.csproj]
travis log (github.com)