| author | Tor Lillqvist <tlillqvist@suse.com> | 2012-08-17 07:41:35 (GMT) |
|---|---|---|
| committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-08-17 07:42:59 (GMT) |
| commit | 79c9ea3818334b39eda6996cf488143a5dc586d4 (patch) (side-by-side diff) | |
| tree | 725f9f0dc9af3dc4163d07e5c4fd29c004c0240e | |
| parent | 6abaf44f813e76d80e76b5f42504e772de8c211b (diff) | |
| download | core-79c9ea3818334b39eda6996cf488143a5dc586d4.zip core-79c9ea3818334b39eda6996cf488143a5dc586d4.tar.gz | |
Fix build breaker in cli_ure: Avoid C# 4.0 when using MSVC 2008
Change-Id: Ieb82b73150330ddbde890f36b88637bf5dfddf51
| -rwxr-xr-x | oowintool | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -212,11 +212,21 @@ sub print_msvs_productdir() sub print_csc_compiler_dir() { - my $csc_exe = - reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Client/InstallPath") || - reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v3.5/InstallPath") || - reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/.NETFramework/InstallRoot") . "v2.0.50727"; - print cygpath ($csc_exe, 'w', $output_format); + my $csc_exe; + my $ver = find_msvc(); + if ($ver->{'ver'} == "9.0") { + # We need to compile C# with the 3.5 or 2.0 compiler in order + # for the assemblies to be loadable by managed C++ code + # compiled with MSVC 2008. + $csc_exe = + reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v3.5/InstallPath") || + reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/.NETFramework/InstallRoot") . "v2.0.50727"; + } else { + # Is it enough to look for the 4.0 compiler? + $csc_exe = + reg_get_value ("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Client/InstallPath"); + } + print cygpath ($csc_exe, 'w', $output_format); } sub print_dotnetsdk_dir() |
