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

**URL:** https://travis-ci.community/t/travis-cant-build-my-project-because-of-not-being-able-to-find-net-6/12178
**Category:** C#
**Tags:** build-env
**Created:** [September 27, 2021, 6:43pm UTC](https://travis-ci.community/t/travis-cant-build-my-project-because-of-not-being-able-to-find-net-6/12178 "2021-09-27T18:43:25Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![zaze06](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/zaze06/32/7204_2.png) [@zaze06](https://travis-ci.community/u/zaze06)
#### Post date: [September 27, 2021, 6:43pm UTC](https://travis-ci.community/t/travis-cant-build-my-project-because-of-not-being-able-to-find-net-6/12178/1 "2021-09-27T18:43:25Z")

</div>

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

```auto
/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)](https://gist.github.com/zaze06/e064325be63afc143015e13994a9fad5)

---

<div class="post-metadata">

### Author: ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)
#### Post date: [September 27, 2021, 7:12pm UTC](https://travis-ci.community/t/travis-cant-build-my-project-because-of-not-being-able-to-find-net-6/12178/2 "2021-09-27T19:12:18Z")

</div>

Normally, [you’d need to specify an appropriate .NET version to install in `.travis.yml`.](https://docs.travis-ci.com/user/languages/csharp/#net-core)  
However, .NET SDK 6 is (as of this writing) not yet available from [MS’ Apt repo](https://packages.microsoft.com/ubuntu/) where [Travis looks for it](https://github.com/travis-ci/travis-build/blob/5f10098154313ca99ed72dbf75c7bdf670708f2b/lib/travis/build/script/csharp.rb#L139-L150) 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](https://github.com/dotnet/core/blob/main/release-notes/6.0/preview/6.0.0-preview.1-install-instructions.md) and specify `mono: none` in `.travis.yml` to suppress installing Mono (which is the default if you don’t specify any version to install).

---

<div class="post-metadata">

### Author: ![zaze06](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/zaze06/32/7204_2.png) [@zaze06](https://travis-ci.community/u/zaze06)
#### Post date: [September 27, 2021, 7:36pm UTC](https://travis-ci.community/t/travis-cant-build-my-project-because-of-not-being-able-to-find-net-6/12178/3 "2021-09-27T19:36:22Z")

</div>

thx will chack that out

---

<div class="post-metadata">

### Author: ![zaze06](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/zaze06/32/7204_2.png) [@zaze06](https://travis-ci.community/u/zaze06)
#### Post date: [September 27, 2021, 8:33pm UTC](https://travis-ci.community/t/travis-cant-build-my-project-because-of-not-being-able-to-find-net-6/12178/4 "2021-09-27T20:33:11Z")

</div>

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

---

<div class="post-metadata">

### Author: ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)
#### Post date: [September 27, 2021, 9:11pm UTC](https://travis-ci.community/t/travis-cant-build-my-project-because-of-not-being-able-to-find-net-6/12178/5 "2021-09-27T21:11:44Z")

</div>

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

---

<div class="post-metadata">

### Author: ![zaze06](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/zaze06/32/7204_2.png) [@zaze06](https://travis-ci.community/u/zaze06)
#### Post date: [September 28, 2021, 4:48am UTC](https://travis-ci.community/t/travis-cant-build-my-project-because-of-not-being-able-to-find-net-6/12178/6 "2021-09-28T04:48:11Z")

</div>

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

---

<div class="post-metadata">

### Author: ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)
#### Post date: [September 28, 2021, 9:44am UTC](https://travis-ci.community/t/travis-cant-build-my-project-because-of-not-being-able-to-find-net-6/12178/7 "2021-09-28T09:44:19Z")

</div>

2 posts were split to a new topic: [Build doesn’t find .NET SDK even though it’s installed](https://travis-ci.community/t/build-doesnt-find-net-sdk-even-though-its-installed/12181)
