It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error on dotnet build

Hi everyone

I am trying to get the BitBucket pipeline up and running. I have found this article and I tried to follow it. But on dotnet build I always get the error "Couldn't find 'project.json' in current directory".

I have a very basic program and structure:

| |-TestApp.sln
| |-TestApp.csproj
| |-Program.cs
| |-program.json

The bitbucket-pipelines.yml looks as follows:

image: microsoft/dotnet:onbuild

    - step:
        script: # Modify the commands below to build your repository.
          - dotnet restore
          - dotnet build

Any idea what I am missing?

1 answer

1 accepted

3 votes
Answer accepted


I had the same problem so thought I'd let you know what I did. The image "microsoft/dotnet:onbuild" looks for a project.json file in the project root but project.json has been deprecated in .NET Core projects and moved to csproj -

So I'm guessing you just don't have the file it is looking for.

I found another thread where this was being talked about and the advice given there was to use a different image:

image: microsoft/dotnet:1.1-sdk

This worked fine for me, original thread -

Hope this helps!



Thank you for your answer. It helped a lot.

I was also facing this issue and it was because the project was using .NET Framework 4.x which isn't available with Pipelines. The solution is to instead use .NET Core.

Suggest an answer

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

Atlassian supported Jenkins integration for Bitbucket Server

We’ve been building a plugin to integrate Bitbucket Server and Jenkins CI, and I’m excited to announce that our alpha is ready to download and install. It lets you seamlessly configure a Jenkins job ...

1,091 views 3 17
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