Can I remove the ReportViewer language packs with ClickOnce installer

可紊 提交于 2020-01-15 09:01:54

问题


I have a .Net 4 WPF application that is deployed through ClickOnce.
The application generates some reports locally and shows them to the user, so it has a reference to Microsoft.ReportViewer.WinForms. These reports are .rdlc and embedded in the application as resources.

Recently, we upgraded the .dll from version 10 to the latest version 14 in order to view the newer schema definitions. The problem is that the older version did not have the option to show reports in other languages, but now, since it does, it includes additional folders in the deploy for each language (de, es, fr, etc.).
These folders add another 28.6 MB to the ClickOnce install (this effectively doubles our application installer size).

Since we do not need any of these language packs, is there a way to not include them when publishing the ClickOnce installer?

And are there any known side affects if these language version .dll's are not included?

Update: I am using post build events to delete the folders, and these remove the folders before the click once publish, but I assume that there is still some configuration so they are not included.


回答1:


You can remove the additional language packs from publishing during the ClickOnce publish.

  1. Open the Project Properties of the project you publish from
  2. Navigate to the Publish tab
  3. Click on the "Application Files..." button
  4. In the Application Files popup select the "Show all files" checkbox at the bottom
  5. Each language will have 3 dll's, if you set the Publish Status to "Exclude" they won't be published with the ClickOnce application

The problem I had was not clicking the "Show all files" checkbox and it looked like the language dll's were all included in the base dll's. If you do this then the ReportViewer will only ever show in the languages whose dll's you include.

If the language dll's are not included the ReportViewer will use the base English version. This is the same behavior as when the system language does not have a specific set of dll's.



来源:https://stackoverflow.com/questions/49553482/can-i-remove-the-reportviewer-language-packs-with-clickonce-installer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!