# C# build with netcore2.1 failed on Linux and succed on Mac/OS

**URL:** <https://travis-ci.community/t/c-build-with-netcore2-1-failed-on-linux-and-succed-on-mac-os/3069>\
**Category:** C#\
**Created:** [April 18, 2019, 11:45pm UTC](https://travis-ci.community/t/c-build-with-netcore2-1-failed-on-linux-and-succed-on-mac-os/3069 "2019-04-18T23:45:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![moh-hassan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/moh-hassan/32/1625_2.png) [@moh-hassan](https://travis-ci.community/u/moh-hassan)\
**Post date:** [April 18, 2019, 11:45pm UTC](https://travis-ci.community/t/c-build-with-netcore2-1-failed-on-linux-and-succed-on-mac-os/3069/1 "2019-04-18T23:45:00Z")

</div>

The [job on Linux](https://travis-ci.org/moh-hassan/odata2poco/jobs/521954913) was running fine and suddenly stop , with the following errors:

> C# support for Travis-CI is community maintained.  
> Please open any issues at [C# - Travis CI Community](https://travis-ci.community/c/languages/37-category) and cc @joshua-anderson @akoeplinger  
> Installing .NET Core  
> $ export DOTNET\_SKIP\_FIRST\_TIME\_EXPERIENCE=1  
> $ export DOTNET\_CLI\_TELEMETRY\_OPTOUT=1  
> 7.70s0.49sE: Unable to locate package dotnet-sdk-2.1  
> E: Couldn’t find any package by glob ‘dotnet-sdk-2.1’  
> E: Couldn’t find any package by regex ‘dotnet-sdk-2.1’  
> The command “sudo apt-get install -qq dotnet-sdk-2.1=2.1.502\*” failed and exited with 100 during .  
> Your build has been stopped.

The same job pass in Mac/Os  
The cnfiguration is c# and netcore2.1

The .travis.yml is [here](https://github.com/moh-hassan/odata2poco/blob/master/.travis.yml):

---

<div class="post-metadata">

**Author:** ![dominic](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dominic/32/14_2.png) [@dominic](https://travis-ci.community/u/dominic)\
**Post date:** [April 19, 2019, 3:11am UTC](https://travis-ci.community/t/c-build-with-netcore2-1-failed-on-linux-and-succed-on-mac-os/3069/2 "2019-04-19T03:11:19Z")

</div>

We are still not clear on what’s triggering this failure but it seems that running your build on `dist: xenial` fixes it.

I’ve created this PR that you can check: [https://github.com/moh-hassan/odata2poco/pull/23](https://github.com/moh-hassan/odata2poco/pull/23).

---

<div class="post-metadata">

**Author:** ![moh-hassan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/moh-hassan/32/1625_2.png) [@moh-hassan](https://travis-ci.community/u/moh-hassan)\
**Post date:** [April 19, 2019, 12:17pm UTC](https://travis-ci.community/t/c-build-with-netcore2-1-failed-on-linux-and-succed-on-mac-os/3069/3 "2019-04-19T12:17:57Z")

</div>

Thanks @dominic  
I merged your PR and It’s working fine on `xenial` dist.

---

<div class="post-metadata">

**Author:** ![dominic](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dominic/32/14_2.png) [@dominic](https://travis-ci.community/u/dominic)\
**Post date:** [April 19, 2019, 12:49pm UTC](https://travis-ci.community/t/c-build-with-netcore2-1-failed-on-linux-and-succed-on-mac-os/3069/4 "2019-04-19T12:49:59Z")

</div>

Glad to hear it! Sorry again for the disruption.

I’ll be closing this topic for now but don’t hesitate to open a new one if this happens again.

---

<div class="post-metadata">

**Author:** ![dominic](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/dominic/32/14_2.png) [@dominic](https://travis-ci.community/u/dominic)\
**Post date:** [April 19, 2019, 12:50pm UTC](https://travis-ci.community/t/c-build-with-netcore2-1-failed-on-linux-and-succed-on-mac-os/3069/5 "2019-04-19T12:50:03Z")

</div>


