Microsoft.SqlServer.Types, version = 11.0.0.0 is missing

I published the project on Azure sites and this excludes:

Microsoft.SqlServer.Types, Version = 11.0.0.0 is missing when I try to run a report. Locally, everything is working fine. I have RepowrtViewer.WebForms and ReportViewer.Common both versions 11.0.0.0 in the project. By machine locally in SDK / builds

I have Microsoft.SqlServer.Types, Version = 11.0..2100.6. I tried to add this to the project, but did not work. This is the exception

Where can I find Microsoft.SqlServer.Types 11.0.0.0?

thanks

+4
source share
6 answers

You are probably referencing the DLL from the global assembly cache on your local machine, but they are not in the GAC in Azure.

Open visual studio and right-click the assembly link Microsoft.SqlServer.Types in your project and select properties. Change the local copy flag from False to True and recompile the application. You should now have the Microsoft.SqlServer.Types.dll file in the bin folder of your application.

Reinstall to azure and hopefully the error disappears.

+3
source

How I decided it.

I had to add 5 files and I moved these 5 files to the bin directory. Then I added these links by going to the bin directory and adding them. I rebuilt my project and copied it to the web server - everything works fine.

  • Microsoft.SqlServer.Types.dll (make sure you copy the correct version since I had sql 2008 but using Report Viewer 11)
  • Microsoft.ReportViewer.ProcessingObjectModel.dll
  • Microsoft.ReportViewer.Common.dll
  • Microsoft.ReportViewer.WebForms.dll
  • Microsoft.ReportViewer.WinForms.dll

Also make sure you have the correct version of these dlls from the GAC in the bin directory, and I installed the report viewer on the server. These are the steps that worked for me.

+2
source

A better solution would be to install the Microsoft.SqlServer.Types NuGet package.

PM> Install-Package Microsoft.SqlServer.Types 

And follow the instructions from readme.htm

+2
source

I had exactly the same problem, but I found a solution pretty quickly. He used the assembly in this folder C: \ Program Files (x86) \ Microsoft SQL Server \ 100, where I deleted my link through Visual Studio and referenced the right file from this folder C: \ Program Files (x86) \ Microsoft SQL Server \ 110

If you still need this link, use this method.

Greetings

+1
source

My experience

I used to encounter such problems until I understood the GAC and Bin deploy

All installed DLLs are installed on your computer in a place called GAC (Global Assembly Cache). therefore, your local programs can search for their needs there if they cannot find the necessary DLL in the execution path. It often works for the developer himself, but when you deploy your program to the client, problems can arise.

Remember that you can always use Bin to deploy your DLLs. first go to the link tree in your project and add the required Dll by looking at your GAC (usually c: \ windows \ assembly \ GAC_MSIL ...), then go to the properties window of the added Dll and set Copy Local to True . Now you can publish or deploy your project and make sure that it will work.

0
source

Make sure you don’t have enough anchor forwarding

  <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> 
0
source

Source: https://habr.com/ru/post/1481119/


All Articles