Search VB 2010

Thursday, July 11, 2019

VS2010 Crystal Reports dll older version vs newer version

VS2010 Crystal Reports dll older version vs newer version

The problem 

- I have Visual Studio 2010 SP1 installed on Windows 10 32 bit, I had CR4VS 13.0.2 working perfectly on both developer machine and client machine with no problems.
- I downloaded CR4VS sp16 (exe)
- I uninstalled CR4VS 13.0.2 completely
- I installed CR4VS sp16 (exe) successfully
- Now, each time I open my Visual Basic 2010 Project I notice that the old CrystalDecision dll still has the same version 13.0.2000.0, although in my C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet .... I have the new version of dll.
Crystal Reports installed in VS 2015 in Win10 32 bit

Crystal Reports 13 sp16 is installed in VS 2010 in Win10 32 bit

CrystalDescision with old version 13.0.2 is still in VS 2010 though

CrystalDecision with new version 13.0.16 is in place correctly
After searching and searching and searching for a solution and also many un-installations and installations trials, I've found the following :

Solution :

Visual Studio 2010 loads its assemblies dll from
C:\Windows.old\Windows\assembly\GAC_MSIL
not from
C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL

so I deleted the windows.old folder
"Please, carefully search for a safe method to do so", I've done the following :

Exit Visual Studio 2010 for now.

Now, If you think you might want to downgrade from Windows 10 back to the previous version, don't delete that folder. Solve your win10 problems first.
Windows 10 will automatically delete the Windows.old folder one month after you performed your upgrade. But we are in a hurry. Here's the proper way to delete the Windows.old folder:

1: Click in Windows' search field, type Cleanup, then click Disk Cleanup.
2: Click the "Clean up system files" button.
3: Wait a bit while Windows scans for files, then scroll down the list until you see "Previous Windows installation(s)."
4: Check the box next to the entry, then make sure there are no other boxes checked (unless you do indeed want to delete those items). Click OK to start the cleanup.
5: Restart

---------- Finally, I realized that :


1) There is a difference between File version and assembly version in CrystalDescision.
2) File version varies (i.e CR4VS 13.0.16 means Developer Version 13 SP16 - File version 13.0.16, but the assembly version will always be 13.0.2.2000
3) Developing and application for x86 CPU needs CR4VS (32 bit) even if you are developing on Win-xx 64 bit and vise versa. (Crystal Reports targets the CPU Arch. target not the OS build)
4) Having your Visual Studio -xx developed with Crystal Reports i.e 13.0.16, you will need Crystal Reports Redist. 13.0.16 for your client machine as well.
5) If you have more than one Visual Studio version installed side-by-side you can work with one compatible Crystal Reports installation (I.e : Visual Studio 2010 side-by-side Visual Studio 2015, you can install CR4VS 13.0.16 for both)
Update : 

According to GAC

Crystal Reports Assembly location : 

Starting with the .NET Framework 4, the default location for the global assembly cache is %windir%\Microsoft.NET\assembly (C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL). In earlier versions of the .NET Framework, the default location is %windir%\assembly. But you won't find any assemblies there because :

.Net3.5

you need the .NET Framework 3.5. Some of the code in the SDK itself requires that version of the framework even though you can compile your application to use newer frameworks.

Crystal Reports Error 1606 "Could not access network location v4.0.30319\ASP.netClientfiles\"
- I reinstalled it using the original (exe) file, not from Add\Remove control panel.

All problems solved by reinstalling CR4VS 13.0.16 using (Exe) after removing CR4VS 13.0.2.

.Net Framework 4.5.2

All .Net frame work 4.0 and up to 4.8 , uses this app.config lines (i.e: I'm creating project using .net framework 4.5.2), so my App.Config file looks something like this :

<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
  </startup>
</configuration>

Visual Basic Courses - Share