1
votes

We are having a problem with Azure DevOps Build Pipelines producing different files than Visual Studio locally. Our Visual Studio 2019 solution has 24 C# based projects. Some crucial DLLs (sites don’t work without them) that are being put into Bin folder when building the solution locally in Visual Studio are missing in when building the solution via Azure DevOps Build Pipelines. The missing DLLs do exist in packages.config.

Here is a screenshot of WinMerge showing that some files exist in Azure DevOps Build Pipelines and missing in Visual Studio locally and vice versa. [enter image description here

Azure DevOps YAML build task:

- task: VSBuild@1
  inputs:
    solution: 'Solution.sln'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'
    msbuildArgs: '/p:OutputPath="$(build.binariesDirectory)\Output\bin"'

How do we debug such behavior and make our builds exactly the same locally and in Azure DevOps?

2

2 Answers

0
votes

I tested with default msbuildArgs in my .Net Core Web Application, and everything works fine.

msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
0
votes

I don't know why, but running MSBuild without any arguments fixed the problem. If somebody could shine some light on that behavior, that would be great!