Steps to reproduce
Ran into this issue using Azure Devops and narrowed it down to MSBuild. If I use the targets of clean and build the files and assets (images and what not) are not copied to the OutputPath but if I use /t:build it does copy the files. This reproduced with multiple different rptproj files including a brand new project created in Visual Studio 2019 (xml below).
Project file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<FullPath>Debug</FullPath>
<OutputPath>bin\Debug</OutputPath>
<ErrorLevel>2</ErrorLevel>
<OverwriteDatasets>False</OverwriteDatasets>
<OverwriteDataSources>False</OverwriteDataSources>
<TargetServerVersion>SSRS2016</TargetServerVersion>
<Platform>Win32</Platform>
<TargetReportFolder>NewReports</TargetReportFolder>
<TargetDatasetFolder>Datasets</TargetDatasetFolder>
<TargetDatasourceFolder>Data Sources</TargetDatasourceFolder>
<TargetReportPartFolder>Report Parts</TargetReportPartFolder>
<TargetServerURL>http://localhost/reportserver</TargetServerURL>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'DebugLocal' ">
<FullPath>DebugLocal</FullPath>
<OutputPath>bin\DebugLocal</OutputPath>
<ErrorLevel>2</ErrorLevel>
<OverwriteDatasets>False</OverwriteDatasets>
<OverwriteDataSources>False</OverwriteDataSources>
<TargetServerVersion>SSRS2016</TargetServerVersion>
<Platform>Win32</Platform>
<TargetReportFolder>NewReports</TargetReportFolder>
<TargetDatasetFolder>Datasets</TargetDatasetFolder>
<TargetDatasourceFolder>Data Sources</TargetDatasourceFolder>
<TargetReportPartFolder>Report Parts</TargetReportPartFolder>
<TargetServerURL>http://localhost/reportserver</TargetServerURL>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<FullPath>Release</FullPath>
<OutputPath>bin\Release</OutputPath>
<ErrorLevel>2</ErrorLevel>
<OverwriteDatasets>False</OverwriteDatasets>
<OverwriteDataSources>False</OverwriteDataSources>
<TargetServerVersion>SSRS2016</TargetServerVersion>
<Platform>Win32</Platform>
<TargetReportFolder>NewReports</TargetReportFolder>
<TargetDatasetFolder>Datasets</TargetDatasetFolder>
<TargetDatasourceFolder>Data Sources</TargetDatasourceFolder>
<TargetReportPartFolder>Report Parts</TargetReportPartFolder>
<TargetServerURL>http://localhost/reportserver</TargetServerURL>
</PropertyGroup>
<PropertyGroup>
<State>$base64$PFNvdXJjZUNvbnRyb2xJbmZvIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zOmRkbDI9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDAzL2VuZ2luZS8yIiB4bWxuczpkZGwyXzI9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDAzL2VuZ2luZS8yLzIiIHhtbG5zOmRkbDEwMF8xMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDA4L2VuZ2luZS8xMDAvMTAwIiB4bWxuczpkZGwyMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEwL2VuZ2luZS8yMDAiIHhtbG5zOmRkbDIwMF8yMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEwL2VuZ2luZS8yMDAvMjAwIiB4bWxuczpkZGwzMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDExL2VuZ2luZS8zMDAiIHhtbG5zOmRkbDMwMF8zMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDExL2VuZ2luZS8zMDAvMzAwIiB4bWxuczpkZGw0MDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEyL2VuZ2luZS80MDAiIHhtbG5zOmRkbDQwMF80MDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEyL2VuZ2luZS80MDAvNDAwIiB4bWxuczpkZGw1MDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEzL2VuZ2luZS81MDAiIHhtbG5zOmRkbDUwMF81MDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEzL2VuZ2luZS81MDAvNTAwIiB4bWxuczpkd2Q9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vRGF0YVdhcmVob3VzZS9EZXNpZ25lci8xLjAiPg0KICA8RW5hYmxlZD5mYWxzZTwvRW5hYmxlZD4NCiAgPFByb2plY3ROYW1lPjwvUHJvamVjdE5hbWU+DQogIDxBdXhQYXRoPjwvQXV4UGF0aD4NCiAgPExvY2FsUGF0aD48L0xvY2FsUGF0aD4NCiAgPFByb3ZpZGVyPjwvUHJvdmlkZXI+DQo8L1NvdXJjZUNvbnRyb2xJbmZvPg==</State>
<DataSources>@(DataSource)</DataSources>
<DataSets>@(DataSet)</DataSets>
<Reports>@(Report)</Reports>
</PropertyGroup>
<ItemGroup>
<DataSource Include="DataSource1.rds" />
</ItemGroup>
<ItemGroup>
<Report Include="Certificate.rdl" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Reporting Services\Microsoft.ReportingServices.MSBuilder.targets" />
</Project>
MSBuild location: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin>
(Some paths removed to protect sensitive information)
Working MSBuild command executed:
.\msbuild.exe "<PathToProjectFile>\NewReports.rptproj" /t:"Build" /p:platform="any cpu" /p:configuration="Release" /p:VisualStudioVersion="16.0"
Output:
Microsoft (R) Build Engine version 16.0.461+g6ff56ef63c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 5/10/2019 12:39:19 PM.
Project "<Path To Project>\NewReports.rptproj" on node 1 (Build target(s)).
ReportBuilderTarget:
Building the report, Certificate.rdl, for SQL Server 2016 Reporting Services.
Building the shared data source 'DataSource1.rds'.
Done Building Project "<Path to Project>\NewReports.rptproj" (Build target(s)).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.19
Not Working:
Working MSBuild command executed:
.\msbuild.exe "<PathToProjectFile>\NewReports.rptproj" /t:"Clean;Build" /p:platform="any cpu" /p:configuration="Release" /p:VisualStudioVersion="16.0"
Output:
Microsoft (R) Build Engine version 16.0.461+g6ff56ef63c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 5/10/2019 12:37:16 PM.
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.14
Expected behavior
RDLs built for designated version of SQL Reporting Server should be in the designated OutputPath for the configuration built.
Actual behavior
No files are output to the OutputPath
Environment data
msbuild /version output:
Locally: Microsoft (R) Build Engine version 16.0.461+g6ff56ef63c for .NET Framework
Also reproduces on Azure Devops Pipelines
OS info:
Windows 10, Visual Studio 2019,
Azure Hosted 2017, Latest Visual Studio
Edited to add, in Azure Devops Pipeline I had to uncheck "clean" in the Visual Studio Build task to get it to work there.
Steps to reproduce
Ran into this issue using Azure Devops and narrowed it down to MSBuild. If I use the targets of
cleanandbuildthe files and assets (images and what not) are not copied to theOutputPathbut if I use/t:buildit does copy the files. This reproduced with multiple different rptproj files including a brand new project created in Visual Studio 2019 (xml below).Project file
MSBuild location:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin>(Some paths removed to protect sensitive information)
Working MSBuild command executed:
Output:
Not Working:
Working MSBuild command executed:
Output:
Expected behavior
RDLs built for designated version of SQL Reporting Server should be in the designated
OutputPathfor the configuration built.Actual behavior
No files are output to the
OutputPathEnvironment data
msbuild /versionoutput:Locally: Microsoft (R) Build Engine version 16.0.461+g6ff56ef63c for .NET Framework
Also reproduces on Azure Devops Pipelines
OS info:
Windows 10, Visual Studio 2019,
Azure Hosted 2017, Latest Visual Studio
Edited to add, in Azure Devops Pipeline I had to uncheck "clean" in the Visual Studio Build task to get it to work there.