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:
+ lsDataExtensions.dll+ cd Tests+ 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 testDetermining 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]Problem was that in Bitbucket LFS is off by default.
Turning it back on solved the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.