Microsoft.SqlServer.Types, Version=11.0.0.0 missing
Asked Answered
I

8

5

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

Immunology answered 16/5, 2013 at 8:56 Comment(1)
microsoft.com/en-gb/download/details.aspx?id=29065 Assume you cannot say copy local on the dll in your project ? You might have to take one of these MSI I think the CLR one and deploy it as a start up process in your webrole.Villarreal
H
4

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.

Heppman answered 16/5, 2013 at 9:47 Comment(3)
Thank you James and Andy. I am still in the process of working it out but it seems that I have made progress by adding Microsoft.ReportViewer.ProcessingObjectModel from GAC to my project. I still have to do some checking but I will definitely post the result here. Again, thanksImmunology
We've got some reports running in Azure with the following references in the project (all prefixed Microsoft.): ReportViewer.Common, ReportViewer.DataVisualization, ReportViewer.ProcessingObjectModel and ReportViewer.WebForms. They are all set to copy locally on build. Hope that helps.Heppman
Thanks Andy. Everything works now. I have added ProcessingObjectModel and set to copy locally. I have also Common and WebForms in the project.Immunology
S
3

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.

  1. Microsoft.SqlServer.Types.dll (make sure you copy the correct version as I had sql 2008 but using report viewer 11)
  2. Microsoft.ReportViewer.ProcessingObjectModel.dll
  3. Microsoft.ReportViewer.Common.dll
  4. Microsoft.ReportViewer.WebForms.dll
  5. Microsoft.ReportViewer.WinForms.dll

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.

Sarmentum answered 8/3, 2014 at 3:1 Comment(1)
Where did you get a copy of Microsoft.SqlServer.Types.dll version 11.0?Incorporator
E
3

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

Elaboration answered 24/2, 2015 at 14:19 Comment(0)
E
1

I had exactly the same issue but found the solution quite quickly. It was using the Assembly within this folder C:\Program Files (x86)\Microsoft SQL Server\100 where I then removed my reference via Visual Studio and referenced the right file from within this folder C:\Program Files (x86)\Microsoft SQL Server\110

If you still need this reference then please make use of this method.

Cheers,

Emetic answered 11/11, 2013 at 13:42 Comment(0)
D
1

Check your SQL server ProductVersion using the following query,

SELECT  
  SERVERPROPERTY('MachineName') AS ComputerName,
  SERVERPROPERTY('ServerName') AS InstanceName,  
  SERVERPROPERTY('Edition') AS Edition,
  SERVERPROPERTY('ProductVersion') AS ProductVersion,  
  SERVERPROPERTY('ProductLevel') AS ProductLevel;  
GO  

It will be like something this,

enter image description here

You can see in my case ProductVersion = 13.0.1601.5. In your project go to NuGet package manager and search Microsoft.SqlServer.Types. From there you can see, Microsoft.SqlServer.Types with the same ProductVersion and Install it.

enter image description here

Doyenne answered 20/7, 2020 at 13:42 Comment(0)
A
0

My Experience

I used to face this kind of problems until I understand the GAC and Bin deploy

Your computer has all the installed DLLs into a place called GAC (Global Assembly Cache). so your local programs can search for their needs in there if they can not find the required DLL in the execution path. It's often work for developer itself, but when you deploy your program to the client, problems may appear.

Remember that, you can always Bin deploy your DLLs. first, go to the references tree in your project and add the required Dll by browsing your GAC (usually c:\windows\assembly\GAC_MSIL...) then go to the property window of the added Dll and set Copy Local to True . Now you can publish or deploy your project and be sure that it will works.

Agreeable answered 31/10, 2015 at 5:37 Comment(0)
H
0

Make sure you are not missing a binding redirect

  <dependentAssembly>
      <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral" />
      <bindingRedirect oldVersion="10.0.0.0-11.0.0.0" newVersion="14.0.0.0" />
    </dependentAssembly>
Handicraftsman answered 30/1, 2018 at 9:26 Comment(0)
S
0

https://www.microsoft.com/en-us/download/details.aspx?id=56041 Download from here if this needs to be installed in your machine

Seizing answered 21/4, 2022 at 13:14 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Candlelight

© 2022 - 2025 — McMap. All rights reserved.