Build SSRS *.rptproj w/ VS 2019 Build Tools

Mark Weber 1 Reputation point
2021-02-27T18:39:50.18+00:00

How do you get reporting projects to build on a server that only has VS2019 Build Tools installed?

My build fails with the following error. There is no "Reporting Services" sub folder under MSBuild on our build server:

error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Reporting Services\Microsoft.ReportingServices.MSBuilder.targets" was not found. Also, tried to find "Reporting Services\Microsoft.ReportingServices.MSBuilder.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild". These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe.Config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. 

Is the only option to separately install reporting services projects from the marketplace: https://marketplace.visualstudio.com/items?itemName=ProBITools.MicrosoftReportProjectsforVisualStudio? The preference is to only have VS Build Tools installed on our build server so a Nuget package or including the required components for SSRS with the VS Build Tools would be ideal.

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,849 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,951 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Dylan Zhu-MSFT 6,406 Reputation points
    2021-03-01T04:24:59.067+00:00

    Hi MarkWeber,

    You can copy the whole Reporting Services folder from

    (one machine with VS and extension) C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\

    to

    (build server) C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\

    Best Regards,
    Dylan


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our **documentation to enable e-mail notifications if you want to receive the related email notification for this thread.**

    3 people found this answer helpful.