Merge pull request #1936 from esdrubal/DotNetRelativeOrAbsolute
[mono.git] / mcs / class / System.Web / System.Web.Compilation / AppResourcesAssemblyBuilder.cs
index f430688bfca3df9a048d72d0ddad303a613dad4b..895440d3a6a8ec33f843523b24777261e37e3014 100644 (file)
@@ -2,10 +2,10 @@
 // System.Web.Compilation.AppResourceAseemblyBuilder
 //
 // Authors:
-//   Marek Habersack (mhabersack@novell.com)
+//   Marek Habersack <grendel@twistedcode.net>
 //
 // (C) 2007-2009 Novell, Inc (http://novell.com/)
-//
+// (C) 2011 Xamarin, Inc (http://xamarin.com/)
 
 //
 // Permission is hereby granted, free of charge, to any person obtaining
@@ -47,6 +47,8 @@ namespace System.Web.Compilation
 {
        class AppResourcesAssemblyBuilder
        {
+               static string framework_version = "4.5";
+               static string profile_path = "net_4_x";
                CompilationSection config;
                CompilerInfo ci;
                CodeDomProvider _provider;
@@ -245,30 +247,18 @@ namespace System.Web.Compilation
                                                        throw new FileNotFoundException ("Windows mono path not found: " + monoPath);
                                        }
                                }
-
-#if NET_4_0
-                                alPath = Path.Combine (p, "4.0\\al.exe");
-#else
-                                alPath = Path.Combine (p, "2.0\\al.exe");
-#endif
+                               alPath = Path.Combine (p, framework_version + "\\al.exe");
+                               
                                 if (!File.Exists (alPath)) {
-#if NET_4_0
-                                        alPath = Path.Combine(Path.GetDirectoryName (p), "lib\\net_4_0\\al.exe");
-#else
-                                        alPath = Path.Combine(Path.GetDirectoryName (p), "lib\\net_2_0\\al.exe");
-#endif
+                                       alPath = Path.Combine (Path.GetDirectoryName (p), "lib\\" + profile_path + "\\al.exe");
                                        if (!File.Exists (alPath))
                                                throw new FileNotFoundException ("Windows al path not found: " + alPath);
                                }
 
                                info.FileName = monoPath;
-                               return alPath;
+                               return alPath + " ";
                        } else {
-#if NET_4_0
                                info.FileName = "al";
-#else
-                               info.FileName = "al2";
-#endif
                                return String.Empty;
                        }
                }