DHB
13 years agoOccasional Contributor
CLR Bridge - Switch between different versions of .NET framework
Hello,
I have got multiple versions of the .NET Framework installed on my PC.
How can I configure the CLR bridge to use a specific version of these frameworks?
My issue:
Following command produces different output, depending on the highest version of .NET Framwork installed:
dotNET.System_Globalization.CultureInfo.GetCultureInfo_2('zh-CN').DisplayName
The application under test, for which I am using this code, is compiled for .NET Version 3.5. For another application on the same PC I need version 4.0, so deinstallation is no option.
I would like to tell TestCompletes CRL bridge to call the routine from .NET Version 3.5 to get the same value, which the application under test produces.
Any suggestions?
(WinXP SP3 Multilanguage, Culture Settings: German)
I have got multiple versions of the .NET Framework installed on my PC.
How can I configure the CLR bridge to use a specific version of these frameworks?
My issue:
Following command produces different output, depending on the highest version of .NET Framwork installed:
dotNET.System_Globalization.CultureInfo.GetCultureInfo_2('zh-CN').DisplayName
.NET Version 3.5 SP1 (with german language pack) = "Chinesisch (VR China)".
.NET Framework 4.0 (with german language pack) = "Chinesisch (Vereinfacht, VR China)"
The application under test, for which I am using this code, is compiled for .NET Version 3.5. For another application on the same PC I need version 4.0, so deinstallation is no option.
I would like to tell TestCompletes CRL bridge to call the routine from .NET Version 3.5 to get the same value, which the application under test produces.
Any suggestions?
(WinXP SP3 Multilanguage, Culture Settings: German)
- Hello everyone,
I think I can share another possible solution I suggested to Dirk within a support case on the matter:1. Create an intermediate .NET application and explicitly load the needed assemblies to it.
2. Build the project using the needed version of .NET.
3. In order to call the needed routines from TestComplete, run the intermediate application and call them through the AppDomain.dotNET property (to learn more, see the "dotNET Property" help topic):
Sys.Process("fakeApp").AppDomain("fakeApp.exe").dotNET