Arreglar conflicto de distintas versiones de Microsoft.ReportViewer
- Había tres paquetes distintos de ReportViewer coexistiendo en el proyecto Esto generaba conflictos al momento de compilar - El web.config cruzaba ensamblados de dos versiones distintas de ReportViewer (no sé como seguía funcionando el sitio...) - Ahora se utiliza el paquete oficial NuGet de ReportViewer OJO no es Microsoft.ReportViewer.2015, que es la versión 12.0.x.x El correcto y que se sigue actualizando es Microsoft.ReportingServices.ReportViewerControl La versión del paquete es 150.x pero las DLL son 15.0.x.x
This commit is contained in:
45
App_Code/SqlServerTypes/Loader.cs
Normal file
45
App_Code/SqlServerTypes/Loader.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SqlServerTypes
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility methods related to CLR Types for SQL Server
|
||||
/// </summary>
|
||||
public class Utilities
|
||||
{
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern IntPtr LoadLibrary(string libname);
|
||||
|
||||
/// <summary>
|
||||
/// Loads the required native assemblies for the current architecture (x86 or x64)
|
||||
/// </summary>
|
||||
/// <param name="rootApplicationPath">
|
||||
/// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications
|
||||
/// and AppDomain.CurrentDomain.BaseDirectory for desktop applications.
|
||||
/// </param>
|
||||
public static void LoadNativeAssemblies(string rootApplicationPath)
|
||||
{
|
||||
var nativeBinaryPath = IntPtr.Size > 4
|
||||
? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\")
|
||||
: Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\");
|
||||
|
||||
LoadNativeAssembly(nativeBinaryPath, "msvcr120.dll");
|
||||
LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial140.dll");
|
||||
}
|
||||
|
||||
private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName)
|
||||
{
|
||||
var path = Path.Combine(nativeBinaryPath, assemblyName);
|
||||
var ptr = LoadLibrary(path);
|
||||
if (ptr == IntPtr.Zero)
|
||||
{
|
||||
throw new Exception(string.Format(
|
||||
"Error loading {0} (ErrorCode: {1})",
|
||||
assemblyName,
|
||||
Marshal.GetLastWin32Error()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
..\packages\Microsoft.ReportViewer.2015.Runtime.12.0.2.2402\lib\Microsoft.ReportViewer.Common.dll
|
||||
..\packages\Microsoft.ReportingServices.ReportViewerControl.WebForms.150.1537.0\lib\net40\Microsoft.ReportViewer.Common.dll
|
||||
Binary file not shown.
1
Bin/Microsoft.ReportViewer.DataVisualization.dll.refresh
Normal file
1
Bin/Microsoft.ReportViewer.DataVisualization.dll.refresh
Normal file
@@ -0,0 +1 @@
|
||||
..\packages\Microsoft.ReportingServices.ReportViewerControl.WebForms.150.1537.0\lib\net40\Microsoft.ReportViewer.DataVisualization.dll
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
..\packages\Microsoft.ReportViewer.2015.Runtime.12.0.2.2402\lib\Microsoft.ReportViewer.ProcessingObjectModel.DLL
|
||||
..\packages\Microsoft.ReportingServices.ReportViewerControl.WebForms.150.1537.0\lib\net40\Microsoft.ReportViewer.ProcessingObjectModel.dll
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
..\packages\Microsoft.ReportViewer.2015.Runtime.12.0.2.2402\lib\Microsoft.ReportViewer.WebForms.DLL
|
||||
..\packages\Microsoft.ReportingServices.ReportViewerControl.WebForms.150.1537.0\lib\net40\Microsoft.ReportViewer.WebForms.dll
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -53,11 +53,8 @@
|
||||
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net461" />
|
||||
<package id="Microsoft.Owin.Security" version="4.2.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Owin.Security.OAuth" version="4.1.0" targetFramework="net461" />
|
||||
<package id="Microsoft.ReportingServices.ReportViewerControl.WebForms" version="150.1358.0" targetFramework="net461" />
|
||||
<package id="Microsoft.ReportViewer.2015.Runtime" version="12.0.2.2402" targetFramework="net461" />
|
||||
<package id="Microsoft.ReportViewer.Common.v12" version="12.0.0.1" targetFramework="net461" />
|
||||
<package id="Microsoft.ReportViewer.WebForms.v12" version="12.0.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.SqlServer.Types" version="14.0.1016.290" targetFramework="net461" />
|
||||
<package id="Microsoft.ReportingServices.ReportViewerControl.WebForms" version="150.1537.0" targetFramework="net48" />
|
||||
<package id="Microsoft.SqlServer.Types" version="14.0.1016.290" targetFramework="net48" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net48" />
|
||||
<package id="morelinq" version="3.3.2" targetFramework="net461" />
|
||||
|
||||
Reference in New Issue
Block a user