Saturday, December 10, 2011

Microsoft.Build.Utilities.v3.5 & Report Viewer 2008


I had to convert one of my web applications from .Net 3.5 version to .Net 4.0 version i.e my task needs me to use only .Net 4 dll in replacement of .Net 3.5 dll. Now, I had to convert all of the related projects or libraries used by my web application to work with .Net 4.I had done the same by changing each of projects .Net framework to 4 from 3.5. Certainly, it’s a very easy task; even I got no sweat to do so in our Air-conditioned officeJ. After changing, .net framework of all the related projects to 4 from 3.5 and done with some cosmetic changes to my web application to be compatible with .net framework 4, I had changed my web application web.config( whatever changes one need to do in web.config can be found in msdn ).

After all these changes with my web application, I tested my application and it was working fine on my development machine. This is not the end of story of this blog, real challenge starts from this onwards. Now I have to test my application on clean windows 2K8 server with IIS7. Then, I deployed my web application there on IIS7 in windows 2k8 server. When I entered username and password to web application then application crashed and showed me an error that it failed to load Microsoft.Build.Utilities.v3.5 dll. Now, it was my time to get surprised, how can it (web application) fail to load a .net 3.5 framework dll? And If I had forgotten to convert some project from .net 3.5 to .net 4 version then it should had been caught by me while I was testing the application on my development machine(windows 7) which hadn’t had .net 3.5 version installed.

After that I checked my web application again , I checked all projects , all of them were already targeted to .net framework version 4.Then I suspected my web.config but there was no sign that I was trying to use any .net framework 3.5 dll or especially Microsoft.Build.Utilities.v3.5 dll. Then I got to know that IIS 7 has a feature from where I can enable .net framework 3.5 and I checked that feature but it was also disabled. Now, it was hard to believe about this abnormal behavior by my web application. Finally, I searched info about this dll on internet and get to know that the dll has something to do with SSRS Report Viewer.

I checked about the report viewer in my application and my application was using repot viewer 2008 and finally I got to know about the real culprit report viewer 2008.

Summary:-Report Viewer 2008 does use Microsoft.Build.Utilities.v3.5 dll.

To remove reference of culprit Microsoft.Build.Utilities.v3.5 dll, I upgraded report viewer from 2008 to 2010 J

No comments:

Post a Comment