summary refs log tree commit diff
path: root/pkgs/build-support/dotnetenv
diff options
context:
space:
mode:
authorSander van der Burg <s.vanderburg@tudelft.nl>2011-09-13 20:07:14 +0000
committerSander van der Burg <s.vanderburg@tudelft.nl>2011-09-13 20:07:14 +0000
commitcdde5132f860c6f9f16a9e069134ebae63b55ac8 (patch)
treecb667d5feb179263dabd6158d72fa7ebe3a6920b /pkgs/build-support/dotnetenv
parent83814bdc418cad61db338c8ed96feff5bb6894c2 (diff)
downloadnixpkgs-cdde5132f860c6f9f16a9e069134ebae63b55ac8.tar
nixpkgs-cdde5132f860c6f9f16a9e069134ebae63b55ac8.tar.gz
nixpkgs-cdde5132f860c6f9f16a9e069134ebae63b55ac8.tar.bz2
nixpkgs-cdde5132f860c6f9f16a9e069134ebae63b55ac8.tar.lz
nixpkgs-cdde5132f860c6f9f16a9e069134ebae63b55ac8.tar.xz
nixpkgs-cdde5132f860c6f9f16a9e069134ebae63b55ac8.tar.zst
nixpkgs-cdde5132f860c6f9f16a9e069134ebae63b55ac8.zip
Removed some obsolete restrictions, so that transitive dependencies are also loaded
svn path=/nixpkgs/trunk/; revision=29249
Diffstat (limited to 'pkgs/build-support/dotnetenv')
-rwxr-xr-xpkgs/build-support/dotnetenv/Wrapper/Wrapper/Wrapper.cs.in34
1 files changed, 11 insertions, 23 deletions
diff --git a/pkgs/build-support/dotnetenv/Wrapper/Wrapper/Wrapper.cs.in b/pkgs/build-support/dotnetenv/Wrapper/Wrapper/Wrapper.cs.in
index 4ea0d6ee6fa..abad090ebcb 100755
--- a/pkgs/build-support/dotnetenv/Wrapper/Wrapper/Wrapper.cs.in
+++ b/pkgs/build-support/dotnetenv/Wrapper/Wrapper/Wrapper.cs.in
@@ -40,37 +40,25 @@ namespace @NAMESPACE@Wrapper
 

         private Assembly MyResolveEventHandler(object sender, ResolveEventArgs args)

         {

-            //This handler is called only when the common language runtime tries to bind to the assembly and fails.

+            // This handler is called only when the common language runtime tries to bind to the assembly and fails.

 

-            //Retrieve the list of referenced assemblies in an array of AssemblyName.

             Assembly MyAssembly;

-            string assemblyPath = "";

+            String assemblyPath = "";

+            String requestedAssemblyName = args.Name.Substring(0, args.Name.IndexOf(","));

 

-            AssemblyName[] referencedAssemblies = exeAssembly.GetReferencedAssemblies();

-

-            //Loop through the array of referenced assembly names.

-            foreach (AssemblyName assemblyName in referencedAssemblies)

+            // Search for the right path of the library assembly

+            foreach (String currentAssemblyPath in AssemblySearchPaths)

             {

-                //Check for the assembly names that have raised the "AssemblyResolve" event.

-                if (assemblyName.FullName.Substring(0, assemblyName.FullName.IndexOf(",")) == args.Name.Substring(0, args.Name.IndexOf(",")))

-                {

-                    //Retrieve the name of the assembly from where it has to be loaded.				

-                    String dllName = args.Name.Substring(0, args.Name.IndexOf(",")) + ".dll";

-

-                    //Search for the right path of the library assembly

-                    foreach (String currentAssemblyPath in AssemblySearchPaths)

-                    {

-                        assemblyPath = currentAssemblyPath + "/" + dllName;

-                        if (File.Exists(assemblyPath))

-                            break;

-                    }

-                }

+                assemblyPath = currentAssemblyPath + "/" + requestedAssemblyName + ".dll";

+

+                if (File.Exists(assemblyPath))

+                    break;

             }

 

-            //Load the assembly from the specified path. 					

+            // Load the assembly from the specified path. 					

             MyAssembly = Assembly.LoadFrom(assemblyPath);

 

-            //Return the loaded assembly.

+            // Return the loaded assembly.

             return MyAssembly;

         }