I have published the project on Azure websites and it throws exception:
Microsoft.SqlServer.Types, Version=11.0.0.0 missing when I try to run report. Locally everything works fine. I have RepowrtViewer.WebForms and ReportViewer.Common both version 11.0.0.0 in the project. On the machine locally in SDK/Assemblies
I have Microsoft.SqlServer.Types, Version=11.0..2100.6. I have tried to add this to the project but did not work. The same exception,
Where do I find Microsoft.SqlServer.Types 11.0.0.0?
Thank you
You're probably referencing the DLL's from the global assembly cache on your local machine but they aren't present in the GAC in Azure.
Open up visual studio and right click on the Microsoft.SqlServer.Types assembly reference in your project and select properties. Change the copy local flag from False to True and recompile your application. You should now have the the Microsoft.SqlServer.Types.dll file in your applications bin folder.
Redeploy to azure and hopefully the error will have vanished.
How I got this solved.
I had to add 5 files altogether and I moved these 5 files to my bin directory. I then added these references by browsing to the bin directory and adding them. I rebuilt my project and copied to web server - all working fine.
Also make sure you have the correct version of these dll's from the GAC in the bin directory and I installed report viewer on the server. These are the steps that worked for me.
The best solution would be to install the Microsoft.SqlServer.Types NuGet package.
PM> Install-Package Microsoft.SqlServer.Types
And follow instructions from its readme.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With