Question upgrading ReportViewer to new version

liptonIcedTea

Well-known member
Joined
Jan 18, 2007
Messages
89
Programming Experience
1-3
Hi, I am upgrading the ReportViewer to the latest version - I've run this (
http://www.microsoft.com/downloads/...BA-DC95-4EB3-8916-3E31340DDC2C&displaylang=en ) and it seems to have upgraded my GAC version of Microsoft.ReportViewer.WebForms to 8.0.50727.817.

This is the version I want, however, in my C:\Program Files\Microsoft Visual Studio 8\ReportViewer folder, the assemblies are still version 8.0.50727.42 which is the old version.

Can someone explain to me what is the GAC and what is the C:\Program Files\Microsoft Visual Studio 8\ReportViewer folder? Because at the moment, my project seems to only be able to take precedence the assembles that are in the C:\Program Files\Microsoft Visual Studio 8\ReportViewer, over the GAC.

I am unable to reference the 8.0.50727.817 version of the ReportViewer in the GAC in my project...
 
Is the toolbox updated to use the new control? If not you should be able to select in "choose toobox items" dialog from .Net tab. Global Assembly Cache is a cache that points to different assemblies in filesystem, multiple versions of an assembly can be registered. During development it is the filesystem file that is mapped and used, but by default it is not copied to the project output folder, during runtime your project calls the GAC assembly and uses that. If your project is referencing the old version that is still used, unless the publisher has registered a special version mapper in GAC, but in many cases publishers of GAC assemblies just install all versions side-by-side so consumer can choose version. Especially for breaking changes in the library this would be preferred.
 
i ended up having to go into the GAC and manually copy these assemblies into my reference directory and then reference these copies.

I have a question. What is the benefit of using the GAC copy of an assembly? I mean, it just sounds so much easier for deployment purposes to deploy your reference assemblies with your project.

In that case, you do not need to manually install things like reportViewer or enterprise library assemblies into different servers. And there is no confusion over different versions of the same assembly from different applications installed on the server. Is there some sort of performance gain or something from installing in the GAC?
 
i ended up having to go into the GAC and manually copy these assemblies into my reference directory and then reference these copies.
By the sound of it, you are not using that library correctly. The control is added from Toolbox which adds correct references (and does not copy the libraries locally). If multiple versions exist and Toolbox reference isn't updated you have manually update Toolbox first.

Without GAC you would need one copy of the .Net Framework library for each application. GAC works best for such libraries shared among many consumers, otherwise use of private assemblies is encouraged.

There is no confusion about versioning in GAC, each assembly has a strong name and only one version will match (or the publisher has issued a version compability policy).

Basically there isn't any performance gains in the GAC as such, but initial references are resolved from the cache first, also GAC assemblies are often installed in Native Image Cache which improves performance by removing the JIT compilation stage.
 
Back
Top