1

I am trying to set up a build pipeline in Azure DevOPS to build a SSRS project. I have a VSBuild task setup like so

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    msbuildArgs: '/p:OutDir="bin\Debug" /p:OutputPath="bin\Debug" /verbosity:diagnostic'
    configuration: '$(configuration)'

I am getting the following error

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Reporting Services\Microsoft.ReportingServices.MSBuilder.targets(30,5): Error MSB4018: The "ReportBuilderTask" task failed unexpectedly System.ArgumentException: The OutputPath property cannot be blank. It must provide a relative path that is a child folder under the path of the report server project. at Microsoft.ReportingServices.BuildProcess.ReportProjectOptions.GetOutputDirectory() at Microsoft.ReportingServices.BuildProcess.ReportProjectOptions.GetOutputFile(String fileName) at Microsoft.ReportingServices.BuildProcess.Builder.BuildReport(ReportReportNode node, ReportProjectOptions options, IMessageHandler messageHandler, ICheckPublish checkPublish) at Microsoft.ReportingServices.BuildProcess.Builder.BuildItems(ICollection collection, ReportProjectOptions options, IMessageHandler messageHandler, ICheckPublish checkPublish) at Microsoft.ReportingServices.BuildProcess.ReportBuilderTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()

I checked the PropertyGroup for my configuration and I do see OutputPath, I am also supplying it as an MSBuild parameter additionally, but it isn't getting picked up it seems.

What am I missing? I am using the hosted agent.

fahadash
  • 3,133
  • 1
  • 30
  • 59
  • This seems to say that you need to have some configuration in the actual project file. Which defeats the purpose of having a cmd line option I know, but perhaps try it and see if it makes a difference https://stackoverflow.com/questions/1100238/the-outputpath-property-is-not-set-for-this-project-error – Nick.Mc Aug 19 '21 at 23:54
  • @Nick.McDermaid Thank you for your comment. I tried adding that as well to the property group matching the condition. Didn't help. – fahadash Aug 20 '21 at 12:54

1 Answers1

0

As stated in the error message, the path cannot be full path. The azure devops variables carry full absolute paths. I have changed the OutputPath property to carry the relative path and things seem to work now.

fahadash
  • 3,133
  • 1
  • 30
  • 59