Loading ...
Sorry, an error occurred while loading the content.

Re: Can I use Fitnesse on a project with references to .NET v4.0 dlls and .NET v3.5?

Expand Messages
  • Matty
    UPDATE: The problem appears to be related to the fact that one of the DLLs has a platform target of x86. So, does anyone know how to test against a
    Message 1 of 3 , Jul 31, 2012
    • 0 Attachment

      UPDATE: The problem appears to be related to the fact that one of the DLLs has a platform target of x86.  So, does anyone know how to test against a combination of x86 and 64 bit dlls?

       

      --- In fitnesse@yahoogroups.com, "Matty" <wolinm@...> wrote:
      >
      >
      > I am currently using Fitnesse server release 20111026 to test against a
      > .NET v4.0 project that contains references to some DLLs of .NET projects
      > that were compiled against .NET v4.0 and some that were compiled using
      > .NET framework v3.5. Visual studio doesn't have an issue with this,
      > however when I add the !path referencing the dll that was built using
      > .NET v3.5 I get the following message from Fitnesse:
      >
      > System.BadImageFormatException: Could not load file or assembly
      > 'MyDLL.DLL' or one of its dependencies. An attempt was made to load a
      > program with an incorrect format.
      >
      > Does anyone know how to work around this issue? Thanks in advance!
      >

    • sergezukov
      Yes, you can but you would have to downgrade to the lowest common denominator. You ll need to get your test runner use x86 otherwise FitNesse will not be able
      Message 2 of 3 , Aug 1, 2012
      • 0 Attachment
        Yes, you can but you would have to downgrade to the lowest common denominator.

        You'll need to get your test runner use x86 otherwise FitNesse will not be able to use reflection to instantiate the class from your x86 class library.

        We are not using slim so all I say will apply to the FitNesse.NET runner also I believe it should work for the SLIM as well.

        All we had to do is to recompile the runner into x86.
        Plus had to make two distinct versions for .NET 2 and .NET 4 as we use both frameworks for different projects. In total we ended up with three runners:
        x86 .NET 2 for the oldest projects;
        any CPU .NET 2 which was the original version (we use it for .NET 3.5 as well)
        any CPU .NET 4 which we use for the latest projects

        I believe what you are looking for is x86 .NET 4


        S.
        --- In fitnesse@yahoogroups.com, "Matty" <wolinm@...> wrote:
        >
        >
        > UPDATE: The problem appears to be related to the fact that one of the
        > DLLs has a platform target of x86. So, does anyone know how to test
        > against a combination of x86 and 64 bit dlls?
        >
        >
        > --- In fitnesse@yahoogroups.com, "Matty" <wolinm@> wrote:
        > >
        > >
        > > I am currently using Fitnesse server release 20111026 to test against
        > a
        > > .NET v4.0 project that contains references to some DLLs of .NET
        > projects
        > > that were compiled against .NET v4.0 and some that were compiled using
        > > .NET framework v3.5. Visual studio doesn't have an issue with this,
        > > however when I add the !path referencing the dll that was built using
        > > .NET v3.5 I get the following message from Fitnesse:
        > >
        > > System.BadImageFormatException: Could not load file or assembly
        > > 'MyDLL.DLL' or one of its dependencies. An attempt was made to load a
        > > program with an incorrect format.
        > >
        > > Does anyone know how to work around this issue? Thanks in advance!
        > >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.