Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSBuild & MSBuild fails when target is specified #14922

Closed
kim3er opened this issue Jun 2, 2021 · 3 comments
Closed

VSBuild & MSBuild fails when target is specified #14922

kim3er opened this issue Jun 2, 2021 · 3 comments
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug Task: MSBuild Task: VSBuild

Comments

@kim3er
Copy link

kim3er commented Jun 2, 2021

Required Information

Bug, VSBuild@1 & MSBuild@1

Environment

Server: Azure Pipelines
Account: WriteUpp
Project: WriteUpp
Build Number: 20210528.4 onwards

Agent: Hosted
Queue: Azure Pipelines
Image: windows-latest

Issue Description

We have a single solution with multiple web projects and shared libraries. We build and deploy each web project in separate jobs within the same pipeline. We specify a target parameter in the build to ensure that only the required project is built in each job.

This was working until last week. At some point last week the build tasks intermittently failed, until Friday, at which point none would run successfully.

For each project in the solution that isn't the target, the same error is generated:

##[error]X.csproj(0,0): Error MSB4057: The target "Projects\Y" does not exist in the project.

This is an example of one of the tasks. We use VSBuild, but I have confirmed that the same error occurs with MSBuild.

          # MSBuild
          - task: VSBuild@1
            inputs:
              solution: "$(solution)"
              msbuildArgs: '/t:Projects\Desktop /clp:ErrorsOnly /verbosity:m /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
              platform: "$(buildPlatform)"
              configuration: "$(buildConfiguration)"
              logFileVerbosity: "minimal"
            displayName: "Build solution"

Running the build command locally runs without error. Running the pipeline tasks without the target parameter works, but obviously builds the whole solution. I also tried rolling back to a previously working build, which now also fails.

Task logs

33.txt

@anatolybolshakov
Copy link
Contributor

This seems to be related to recent Visual Studio update on images - since there was no changes for pipeline tasks.

@kim3er
Copy link
Author

kim3er commented Jun 3, 2021

That seems to be confirmed by this ticket, actions/runner-images#3475.

@kim3er
Copy link
Author

kim3er commented Jun 15, 2021

I can confirm the targets cli parameter is work on VSBuild 1.187.0.

@kim3er kim3er closed this as completed Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work bug Task: MSBuild Task: VSBuild
Projects
None yet
Development

No branches or pull requests

3 participants