.Net framework assemblies in BitBucket pipelines

Hi everyone,

I'm trying to build our .Net application in Bitbucket pipelines. We want to target the .Net framework 4.5.2.

Here is my project.json file:

{
    "name": "MyProjectName",
    "frameworks": { 
        "net452": {
            "frameworkAssemblies": {
                "System.ComponentModel.DataAnnotations": "4.0.0.0",
                "System.Data": "4.0.0.0",
                "System.Web": "4.0.0.0",
                ...
            },
            ...
        }
    }
}

If I use the dotnet build command on my machine, it works well. But in Pipelines, I get this message:

"error DOTNET1012: The reference assemblies directory was not specified. You can set the location using the DOTNET_REFERENCE_ASSEMBLIES_PATH environment variable."

Is it possible to build .Net projects with framework assemblies? And if yes, what changes should I do?

Thanks in advance.

3 answers

1 accepted

0 vote

Hey Andreas,

It looks like this is a result of incompatibilities with .NET and docker. For more information on running .NET with pipelines check http://davevde.github.io/using-bitbucket-pipelines-with-aspnet-core/ and https://blog.maartenballiauw.be/post/2016/08/17/building-nuget-netcore-using-atlassian-bitbucket-pipelines.html.

Hi Thomas,

My application cannot be compiled with .NET Core, so I won't be able to use Pipelines for my project. I tried with a smaller one and it worked.

I will wait for .NET Core development then, thanks for the help!

0 vote

Hey Andreas,

Because pipelines uses Docker to build your branch it uses Linux and therefore can only use .NET Core. Have you tried running your build using .NET Core? Have you tried running it using the docker image you have set up on pipelines?

Hi Thomas,

Thanks for your answer.

I tried building the application on the docker image and indeed it fails there as well.

I will see if I can build locally before reusing Pipelines.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

30,653 views 26 12
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you