Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

how to set up bitbucket pipeline to build .Net core 5.0 project

Exploring bitbucket pipeline to create a CI/CD for a .net 5.0 microservice project. Please find the .yml file below


- step:
name: Build MicroService
- dotnetcore
- export PROJECT_NAME=MyProjectName
- dotnet restore
- dotnet build $PROJECT_NAME

 But I am seeing this error when the pipeline runs,


dotnet build $PROJECT_NAME
+ dotnet build $PROJECT_NAME
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
Restored /tmp/10vu21df.v2w/WorkerExtensions.csproj (in 1.42 sec).
WorkerExtensions -> /tmp/10vu21df.v2w/buildout/Microsoft.Azure.Functions.Worker.Extensions.dll
/root/.nuget/packages/,5): error : It was not possible to find any compatible framework version [/tmp/10vu21df.v2w/WorkerExtensions.csproj]
/root/.nuget/packages/,5): error : The framework 'Microsoft.NETCore.App', version '3.1.0' was not found. [/tmp/10vu21df.v2w/WorkerExtensions.csproj]
/root/.nuget/packages/,5): error : - The following frameworks were found: [/tmp/10vu21df.v2w/WorkerExtensions.csproj]
/root/.nuget/packages/,5): error : 5.0.12 at [/usr/share/dotnet/shared/Microsoft.NETCore.App] [/tmp/10vu21df.v2w/WorkerExtensions.csproj]
/root/.nuget/packages/,5): error : [/tmp/10vu21df.v2w/WorkerExtensions.csproj]
/root/.nuget/packages/,5): error : You can resolve the problem by installing the specified framework and/or SDK. [/tmp/10vu21df.v2w/WorkerExtensions.csproj]
/root/.nuget/packages/,5): error : [/tmp/10vu21df.v2w/WorkerExtensions.csproj]
/root/.nuget/packages/,5): error : The specified framework can be found at: [/tmp/10vu21df.v2w/WorkerExtensions.csproj]
/root/.nuget/packages/,5): error : - [/tmp/10vu21df.v2w/WorkerExtensions.csproj]
/root/.nuget/packages/,5): error : [/tmp/10vu21df.v2w/WorkerExtensions.csproj]
/root/.nuget/packages/,5): error : Metadata generation failed. [/tmp/10vu21df.v2w/WorkerExtensions.csproj]
Looks like it also needs .net 3.1.0. But not sure how to do it. Tried by including Services like below but no luck.

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,263 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you