Microsoft Report Viewer winforms version 15 assembly not packing into exe for click once

Matt Boehm 0 Reputation points
2024-02-22T12:18:58.1533333+00:00

It used to work until the version 150.1620.0 update of the nuget package of Microsoft Reporting Services ReportViewControl Winforms. Deploying a click once I was able to run the standalone exe by itself. After the update it is requiring the dlls for the reporting services. I've tried pre reqs, interop, installing them on my computer etc... it works if you run the manifest but I need the standalone exe for the reporting services. This is the project url https://learn.microsoft.com/en-us/sql/reporting-services/application-integration/integrating-reporting-services-using-reportviewer-controls-get-started?view=sql-server-ver16

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.
3,061 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Debarchan Sarkar - MSFT 1,131 Reputation points Microsoft Employee
    2024-02-25T01:17:03.78+00:00

    The issue you're describing seems to be related to dependencies introduced in the new version (150.1620.0) of the Microsoft Reporting Services ReportViewerControl Winforms nuget package. Here are some steps that could help you address this problem: Specify Copy Local: Ensure that the DLLs for reporting services are being copied to the output directory. In Visual Studio, go to Solution Explorer, find the reference to your DLL, right-click on it and select Properties. There's a property called "Copy Local". Make sure it's set to True. ClickOnce Application Files: Open the properties of your project, go to the Publish tab, click on "Application Files...". In the window that opens, make sure all necessary DLLs have their Publish Status set to "Include". Manually Add DLLs: If the above solutions don't work, as a last resort, you can manually add the DLLs to your published application folder after publishing.

    Remember, the standalone .exe file requires all necessary DLL files to be in the same directory so it can run correctly. If one or more DLLs are missing, it will fail to run.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.