I am trying to build a netcore 3.1 application in a bitbucket pipeline and the build fails with an error stating it can't find the csproj file.
pipeline.yml:
# Only use spaces to indent the .yml configuration.# -----
pipelines:
branches:
develop:
- step:
name: Dotnet Csharp files
image: mcr.microsoft.com/dotnet/core/sdk:3.1
caches:
- dotnetcore
script:
- cd $BITBUCKET_CLONE_DIR/EPTk/TRIDENT_HG/Src/TRIDENT_HG
- export PROJECT_NAME=TRIDENT_HG.csproj
- dotnet restore
- dotnet build --no-restore $PROJECT_NAME
artifacts: - /EPTk/TRIDENT_HG/Src/TRIDENT_HG/**
Error Message:+ dotnet build $PROJECT_NAME
Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
All projects are up-to-date for restore.
WebCompiler: Begin compiling compilerconfig.json
WebCompiler installing updated versions of the compilers...
/root/.nuget/packages/buildwebcompiler/1.12.405/build/BuildWebCompiler.targets(12,9): error : No such file or directory [/opt/atlassian/pipelines/agent/build/EPTk/TRIDENT_HG/Src/TRIDENT_HG/TRIDENT_HG.csproj]
Build FAILED.
/root/.nuget/packages/buildwebcompiler/1.12.405/build/BuildWebCompiler.targets(12,9): error : No such file or directory [/opt/atlassian/pipelines/agent/build/EPTk/TRIDENT_HG/Src/TRIDENT_HG/TRIDENT_HG.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:10.28