Recently I tried out Visual Studio 2017. We've got a MSDN Subscription. We're working on some internal apps which we're writing as WPF apps. These apps need to be installed on user machines (Windows 7 through Windows 10) where the users have no administrative privileges. The thing which has hurt us the most, at this point, is getting the ReportViewer control to install without requiring an administrator to be around. It was impossible with VS 2015 and older, because (so I understand) VS 2015 and older, the ReportViewer control is an ActiveX control which requires admin privileges to install. I have been told that with VS 2017 the new ReportViewer control (version 14) is not an ActiveX control; that it does not require admin privileges. This is great news and I told my colleagues this. In order to demonstrate this I wrote a very simple WPF app using VS 2017. All I did was put the ReportViewer control onto a window. It did take about 6 weeks to finally get it to work (way longer than it should have), but I got it to deploy to a machine using ClickOnce deployment.
Next I thought I'd prove to myself that I could do it again, this time taking notes as to what I did. I've tried twice to duplicate the same, simple app, but I keep getting the following message:
This is not going to do at all, because that takes us right back to the same problem - some admin must be near by to install this app. We do not want that. Briefly here are the steps I took:
- Installed the Microsoft.SqlServer.Types version 14.0.314.76 using the Package Manager Console from within VS.
- Installed Microsoft.ReportingServices.ReportViewerControl.Winforms version 140.340.80 using Package Manager Console
- In XAML I included namespace Microsoft.ReportViewer.WinForms in the window tag.
- Added references to System.Windows.Forms and WindowsFormsIntegration
Added the following XAML in the Grid tag of the window:
Set up the ClickOnce deployment
Because of a bug involving the Chinese location files, I went into the project's Publish tab | Application Files and sent all of the files beginning with "zh-" to Exclude for Publish Status.
Then I published it to the network share and ran the ClickOnce Setup.exe on a machine which didn't have the older ReportViewer installed using an account with no privileges.
And I got the "System Update Required" message I gave near the beginning of this post.
Why is this happening? Why does it require Microsoft.VisualStudio.Text.Logic be installed in the GAC? Especially for an app that doesn't even connect to any database at all?
