Microsoft.CodeAnalysis build failing despite project locally running correctly

330 views Asked by At

I am getting an error upon build in Azure DevOps when trying to merge to develop:

##[error]CSC(0,0): Error CS0006: Metadata file '..\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll' could not be found ##[error]CSC(0,0): Error CS0006: Metadata file '..\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll' could not be found

I had this error in my Visual Studio when building the solution as well but I reinstalled CodeAnalysers and it had gone.

It is an Umbraco project (7.15.3) so it is using version 1.0.0 Analysers.

I do not understand why it is failing on build in DevOps if it's compiling correctly on my local?

The build step is shows this config in YAML:

steps:
- task: VSBuild@1   displayName: 'Build solution'   inputs:
    solution: '$(Parameters.solution)'
    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true
/p:PackageLocation="$(build.artifactstagingdirectory)\\"'
    platform: '$(BuildPlatform)'
    configuration: '$(BuildConfiguration)'

Can anyone help please?

0

There are 0 answers