2

I am new to NServiceBus so sorry for any noob mistakes. Now the problem is I have a project which has to build and run in x64. When I build the project I receive this warning:

Assembly generation -- Referenced assembly 'NServiceBus.dll' targets a different processor

I have searched quite a bit for why NServiceBus is running on x86 and how to fix this, however I keep finding that NServiceBus is built to use any cpu so me switching to x64 should not matter. But when I try to run I get this error:

System.BadImageFormatException was unhandled
  Message=Could not load file or assembly 'TestProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
  Source=mscorlib
  FileName=TestProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  FusionLog=""
  StackTrace:
       at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
       at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
       at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
       at System.Type.GetType(String typeName, Boolean throwOnError)
       at NServiceBus.Host.Program.GetEndpointConfigurationType()
       at NServiceBus.Host.Program.Main(String[] args)
  InnerException: 

I know this error means I need to be using x86, however I cannot just simply go to x86 as this project relies on another project that is built for x64 and I cannot control that project. I'm not sure if this is a problem or not but the project is running on .Net Framework 3.5.

Thanks for any help.

Josh
  • 55
  • 3
  • 9
  • Possible duplicate http://stackoverflow.com/questions/3244464/how-to-solve-warning-referenced-assembly-targets-a-different-processor-than-the – John Simons Jun 26 '13 at 23:46
  • I don't remember if I found that thread or not. But I found one that was asking something like that and it did not help as the answer was to choose x86 to compile and run the project, which is something I cannot do as the project has to remain x64 because one of the projects references is built only for x64. – Josh Jun 27 '13 at 14:26
  • I think the NSB v3.x requires .NET4, see http://stackoverflow.com/questions/15480988 – Chris Bednarski Jun 28 '13 at 09:57

0 Answers0