Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

DirectoryNotFoundException StaticWebAssets "Could not find a part of the path"

Bernt Rosmo
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!
February 2, 2024

Hi.

 

I updated our project from .net6 project to .net8.

Its a fairly standard .net web project, c# with razor.

Locally it runs without problem.

When we build using pipelines, we get:

/usr/share/dotnet/sdk/8.0.101/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/Microsoft.NET.Sdk.StaticWebAssets.Pack.targets(136,5): error MSB4018: System.IO.DirectoryNotFoundException: Could not find a part of the path '/opt/atlassian/pipelines/agent/build/src/web/obj/Release/net8.0/staticwebassets/msbuild.byggforsk/certification.Microsoft.AspNetCore.StaticWebAssets.props'. [/opt/atlassian/pipelines/agent/build/src/web/web.csproj

 

I tried to build locally with ling paths, which seems to be a problem after som searching on the web, but still works OK.

I tried with .net7, same error.

I reverted back to .net6, then pipeline works OK.

We updated sdk´s in pipline and docker files accordingly.

Anyone experienced something similar?

 

 

2 answers

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 5, 2024

Hi Bernt,

Do these Pipelines builds run on Atlassian's infrastructure or are you using one of our self-hosted runners?

If the Pipelines builds run on Atlassian infrastructure, they use Docker containers. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file.

You can debug the build locally with Docker (using the same image you have defined in your yml file) to narrow down whether the issue is specific to Pipelines or not. This knowledge base article has step-by-step instructions on how to do that:

If the build fails locally with Docker when you follow this guide, the error may be related to the Docker image you use as a build container or your project's configuration.

If the build is successful when you debug locally using our guide, you can create a ticket with the support team and share the failed build URL, and the output of your local build with Docker, for further investigation. You can create a ticket via https://support.atlassian.com/contact/#/, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you enter the URL of the workspace that is on a paid billing plan to proceed with ticket creation.

Kind regards,
Theodora

0 votes
Bernt Rosmo
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!
February 8, 2024

Hi.

 

The pipelines run on Atlassian's infrastructure, using the same .net8 Docker containers that we use for the other comparable projects.

I will have a look into your suggestions.

Thanks

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events