Travis cant build my project because of not being able to find .net 6

Hi i have just started using travis to test build my project on github but it keeps failing becus of it cant find .net 6

error from log

/usr/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1193,5): error MSB3644: The reference assemblies for .NETFramework,Version=v6.0 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]

whole log travis log (github.com)

Normally, you’d need to specify an appropriate .NET version to install in .travis.yml.
However, .NET SDK 6 is (as of this writing) not yet available from MS’ Apt repo where Travis looks for it so that would fail in your case.

If you need this prerelease version, you’ll have to install it by hand according to official instructions and specify mono: none in .travis.yml to suppress installing Mono (which is the default if you don’t specify any version to install).

thx will chack that out

I’m sorry, but I can’t find how I would install it by hand, or do I put it in my GitHub repository?

What’s unclear in the linked official instructions? You need to execute appropriate commands, probably at the before_install phase.

the thing that’s unclear is how I execute them on the Linux distro that runs my build

2 posts were split to a new topic: Build doesn’t find .NET SDK even though it’s installed

Imprint