Forums

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

Why does my netcore 3.1 build fail in a pipeline?

Jason Esteve
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!
June 2, 2020

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:
        nameDotnet Csharp files
        imagemcr.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_NAMEMicrosoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET CoreCopyright (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

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events