The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Bitbucket Pipeline Unexpectedly Errors

Gabriel
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!
April 7, 2022

I got a net solution that I can run/build/test locally.

I can also run/build/test inside a docker container no problem.

In my setup I have the following folder Structure


/root

   /Backend

        /Backend

             Backend.csproj

        /Tests

             Tests.csproj
/Lib


<Reference Include="DataExtensions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\Lib\DataExtensions.dll</HintPath>
</Reference>

Locally it all works. It also works in other Pipelines, but in Bitbucket pipeline, for some reason, it fails to find the required dependency. I validated its there in the repo.

Here's the full test log:

Build setup23s
REPORTS_PATH=./test-reports/build_${BITBUCKET_BUILD_NUMBER}



cd Backend <1s



cd Lib <1s



ls <1s



+ ls
DataExtensions.dll



cd .. <1s



cd Tests <1s



+ cd Tests



cat Tests.csproj<1s



+ cat Tests.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
<PackageReference Include="coverlet.collector" Version="3.1.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="DataExtensions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\Lib\DataExtensions.dll</HintPath>
</Reference>
</ItemGroup>
</Project>



dotnet test4s
+ dotnet test

Determining projects to restore...

Restored /opt/atlassian/pipelines/agent/build/Backend/Tests/Tests.csproj (in 1.52 sec).

/usr/share/dotnet/sdk/6.0.201/Microsoft.Common.CurrentVersion.targets(2301,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "DataExtensions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/opt/atlassian/pipelines/agent/build/Backend/Tests/Tests.csproj]

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Gabriel
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!
April 7, 2022

Problem was that in Bitbucket LFS is off by default.

Turning it back on solved the issue.

TAGS
AUG Leaders

Atlassian Community Events