we have an application written in .NET 4.0 which uses this SAP Crystal Reports. While the same build (x86) is working perfectly OK in Windows 2003/2008 (both x86/x64) with .NET 4.0 framework installed (x86) and CrystalReports runtimes installed (donwladed from SAP pages http://scn.sap.com/docs/DOC-7824) using the 13.0.1.x (32bit_13_0_1.msi).
When the same stuff is installed in MS 2012 server (x64), there is already .NET framework 4.5 pre-installed, thus I was not able to install .NET 4.0, however it looks like it's backwards compatible, because the application is working properly, with exception of the Crystal Reports part, where the application throws an exception.
Could not load file or assembly 'CrystalDecisions.CrystalReports.Engine, Version 10.5.3700.0, culture=neutral, PublicKeyToken=blahblah' or one of its dependencies. The system cannot find the file specified.
Of course the runtimes are installed, but for some reason our application can't recognize those DLLs. Personally I don't think it's a build issue as it works properly with same configuration in 2003/2008 server.
We have there only release version installed, so no debugging options are available, nor VS is installed.
Basically we're just performing some tests if the application works properly in 2012 server, but this issue seems impossible to solve. I've spent hours on Google to no avail. So any idea what to check is highly appreciated :)
Thanks Tomas
Edit
Solution: to install older 2008 runtimes.
Root cause: On our build machine we have both runtimes still installed (we need to support older versions as well). In proj files the CR assemblies are not referenced version specific, just by the name. So during the build process the first lowest matching assembly from GAC was used and hence the need to have the CR 2008 installed as well. Solution is to reference the 3rd party assemblies in project files also by version to force the usage of newer ones.
We ran into the same issue, however in our project the version was specified. Also our project was not strong named. Strong naming the assemblies would make this a non issue.
.csproj before
<Reference Include="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\..\..\Workspace\SharedLibraries\trunk\Lib\CrystalDecisions.ReportSource.dll</HintPath>
</Reference>
Notice the SpecificVersion is set to false. Switching this to true might of solved the issue, we did not try that.
The hint path was either not found or was the older version. If it was not found then it would grab the first Crystal dll found in the GAC which is the 10.5 version.
.csproj after
<Reference Include="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" />
This forces the build against the correct version.