Pipeline failing to build .NET 4.8 projects

Sarah October 1, 2024

Hi,

I have been struggling for weeks to figure out how to get a pipeline running for our Bitbucket repo. Our application was designed in Visual Studio 2019 with .NET 4.8. When I try using the mcr.microsoft.com/dotnet/sdk:5.0 image, the pipeline tries to build but then I get the following error message:

 

error MSB3644: The reference assemblies for .NETFramework,Version=v4.8 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

 

However, I have downloaded and installed the Developer Pack to my PC but this doesn't seem to get the pipeline to recognize that it is there. (I am new to pipelines, so please let me know if I am missing a step there).

 

Alternatively, I have tried using the images 

mcr.microsoft.com/dotnet/framework/runtime:4.8

and 

mcr.microsoft.com/dotnet/framework/sdk:4.8

but get the errors:

 

rpc error: code = NotFound desc = failed to pull and unpack image "mcr.microsoft.com/dotnet/framework/sdk:4.8": no match for platform in manifest: not found

and

 

failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown.

 

Does anyone have any ideas about what I'm doing wrong here?

1 answer

1 accepted

1 vote
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 2, 2024

Hi Sarah,

Are you using self-hosted Runners or standard Bitbucket Pipelines?

Cheers!

- Ben (Bitbucket Cloud Support)

Sarah October 4, 2024

Hi Ben, 

I have been using standard Bitbucket Pipelines. Is using self-hosted runners a better choice?

 

Thanks,

Sarah

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 7, 2024

Hi Sarah,

Please allow me to step in as Ben is out of office at the moment.

I see that the error message you posted mentions .NET Framework. Pipelines builds that run on Atlassian's infrastructure don't support .NET framework but only .NET Core. The .NET framework requires Windows and Pipelines currently run on Linux hosts.

For .NET Framework, you can use a self-hosted runner on a Windows machine of yours:

Windows Runners use PowerShell to run pipeline steps on your Windows machine (host device). You will still be able to view build logs in the Pipelines page of the repo and you won’t be charged for the build minutes used by your self-hosted Windows runners.

We have the following feature request about adding support for Windows builds on Atlassian's infrastructure:

You can add your vote and feedback to the feature request if you'd be interested in this.

Please feel free to reach out if you have any questions!

Kind regards,
Theodora

Like Sarah likes this
Sarah October 7, 2024

Thank you, this really helps!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events