Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to setup build pipeline for .Net 5.0

yassinlokhat September 8, 2021

Hi everyone,


I got a bitbucket repository for a .Net 5.0 project.

The solution contains some .Net 5.0 class library projects and some .Net 5.0 winform projects.

I just want to ask how to setup a build pipeline to esure that all comited code always build?


Best regards,

1 answer

1 accepted

1 vote
Answer accepted
Rafael F_ September 8, 2021
yassinlokhat September 10, 2021

Thank you for your answer.


I tried the followin scriot but the job failed :


# This is a sample build configuration for .NET Core.
# Only use spaces to indent your .yml configuration.
# -----
# You can use any Docker image from Docker Hub, or your own container registry, as your build environment.
image: microsoft/dotnet:sdk:5.0
- step:
script: # Modify the commands below to build your repository.
- export PROJECT_NAME=UpsilonEcosystem.sln
- export TEST_NAME=UpsilonEcosystem.sln
- dotnet restore
- dotnet build $PROJECT_NAME
- dotnet test $TEST_NAME
Like Abir Stolov likes this
Rafael F_ September 10, 2021

What was the error message?

yassinlokhat September 10, 2021
/opt/atlassian/pipelines/agent/build/Upsilon/Common/Forms/Upsilon.Common.Forms.csproj : error NU1201: Project Upsilon.Common.Library is not compatible with net50-windows (.NETFramework,Version=v5.0,Profile=windows). Project Upsilon.Common.Library supports: net50 (.NETFramework,Version=v5.0) [/opt/atlassian/pipelines/agent/build/UpsilonEcosystem.sln]
Like Adrian-Nikola De Ro likes this
Adrian-Nikola De Ro
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 18, 2022

Did you find an answer to this error?

Rafael F_ July 18, 2022

This is usually exactly what the error message says, you have to make sure your projects target the same version, in this case either net50-windows or net50, this can probably be changed manually on the csproj files.

yassinlokhat July 18, 2022

I wouldn't change any thing in my project's files because they build successfully on my local machine.

yassinlokhat July 18, 2022

I think the issue is that my solution contains both net50-windows and net50 projects.

I will abandon this, I prefer make my project build in my working machine before commiting.


Thank you for your help.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events