tmauldin / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

32bit dll on 64bit Windows #837

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a test project on Windows 7 64bit
2. Reference 32bit dll in test project
3. Run Icarus 

What is the expected output? What do you see instead?
Get an exception in Annotations with "An exception was thrown while exploring 
tests. Unable to load one or more of the requested types..."

Took forever to find the problem, there should be a way to see more detailed 
errors or maybe a warning. The way I found the problem after many attempts at 
debugging was to run NUnit. It gave a bad format exception, doh!!

What version of the product are you using? On what operating system?
Windows 7
VS 2010
Gallio 3.2

Please provide any additional information below.

Original issue reported on code.google.com by tim.pl...@gmail.com on 24 Apr 2011 at 10:56

GoogleCodeExporter commented 9 years ago
If the you could set the Host runner for each project it would be ideal. By 
renaming the Gallio.Host.x86.exe to Gallio.Host.exe I can run my CassiniDev 
tests in 32bit mode. Same goes for sqlite, both use native calls and therefore 
must be compiled to a certain architecture.

This is really important as more and more PC's with be 64bit. NUnit provides a 
x86 host which works nicely.

This method could look up a project property?

        private static string GetHostFileName(ProcessorArchitecture processorArchitecture, bool elevated)
        {
            // TODO: Should find a way to verify that Amd64 / IA64 are supported.
            switch (processorArchitecture)
            {
                case ProcessorArchitecture.None:
                case ProcessorArchitecture.MSIL:
                case ProcessorArchitecture.Amd64:
                case ProcessorArchitecture.IA64:
                    return elevated ? "Gallio.Host.Elevated.exe" : "Gallio.Host.exe";

                case ProcessorArchitecture.X86:
                    return elevated ? "Gallio.Host.Elevated.x86.exe" : "Gallio.Host.x86.exe";

                default:
                    throw new ArgumentOutOfRangeException("processorArchitecture");
            }
        }

Original comment by tim.pl...@gmail.com on 29 Apr 2011 at 11:03