qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Rolke <cro...@redhat.com>
Subject Re: C# error when loading org.apache.qpid.messaging.dll
Date Fri, 19 Oct 2012 19:47:31 GMT
I've never been able to run a mix of 32-bit and 64-bit apps and interop DLLs in this environment.
In particular the 64-bit org.apache.qpid.messaging.dll loads the 64-bit native qpidmessaging.dll
which in turn loads the 64-bit msvc run time. Maybe I missed something but mixing the architectures
never worked for me.

Another factor to be aware of is the trouble arising from recompiling the org.apache.qpid.messaging
dll. If you have another project that has referenced the qpid assembly and the qpid assembly
is recompiled then the other project won't find the qpid assembly any more. It must be removed
and rereferenced from your project. It's a pain and that's why the example solution projects
maintain a project reference to the qpid assembly.

-Chuck

----- Original Message -----
> From: "Cliff Jansen" <cliffjansen@gmail.com>
> To: users@qpid.apache.org
> Sent: Friday, October 19, 2012 2:28:08 PM
> Subject: Re: C# error when loading org.apache.qpid.messaging.dll
> 
> If the C# is 64 bit (or cpu-any and launched as 64 bit) it will pull
> in the 64bit CLR which cannot be mixed with the 32 bit version.  You
> can force your C# to be 32 bit from some setting in Visual Studio.
> You can also set a property on the dll after the fact with some tool
> from the SDK.
> 
> Cliff
> 
> On Fri, Oct 19, 2012 at 11:08 AM, Rajesh Khan
> <rajeshkhan808@gmail.com> wrote:
> > Yes Steve I resolved the issue , thank you for asking. It seems
> > that I was
> > needed to place some boost dll files next to the built dll. I am
> > just
> > curious if 64bit dll also works with x86 C sharp program .
> >
> > On Thu, Oct 18, 2012 at 5:36 PM, Steve Huston
> > <shuston@riverace.com> wrote:
> >
> >> Did you get this resolved yet Rajesh?
> >>
> >> If not, it sounds like maybe the new DLL isn't in the PATH or with
> >> your
> >> exe. If that's not it, you can use the depends tool (downloadable
> >> from
> >> Microsoft if it's not included with your Visual Studio) to see
> >> which
> >> dependencies are missing.
> >>
> >> -Steve
> >>
> >> On 10/17/12 7:11 PM, "Rajesh Khan" <rajeshkhan808@gmail.com>
> >> wrote:
> >>
> >> >Still getting the following exception with 32bit mode (debug) dll
> >> >
> >> >
> >> >System.IO.FileNotFoundException was unhandled
> >> >  Message=Could not load file or assembly
> >> >'org.apache.qpid.messaging.dll' or one of its dependencies. The
> >> >specified module could not be found.
> >> >  Source=QpidRx_CSharp
> >> >  FileName=org.apache.qpid.messaging.dll
> >> >  FusionLog=""
> >> >  StackTrace:
> >> >       at QpidRx_CSharp.Program.Main()
> >> >       at System.AppDomain._nExecuteAssembly(RuntimeAssembly
> >> >       assembly,
> >> >String[] args)
> >> >       at System.AppDomain.ExecuteAssembly(String assemblyFile,
> >> >Evidence assemblySecurity, String[] args)
> >> >       at
> >> >Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
> >> >       at
> >> >       System.Threading.ThreadHelper.ThreadStart_Context(Object
> >> >       state)
> >> >       at System.Threading.ExecutionContext.Run(ExecutionContext
> >> >executionContext, ContextCallback callback, Object state, Boolean
> >> >ignoreSyncCtx)
> >> >       at System.Threading.ExecutionContext.Run(ExecutionContext
> >> >executionContext, ContextCallback callback, Object state)
> >> >       at System.Threading.ThreadHelper.ThreadStart()
> >> >  InnerException:
> >> >
> >> >
> >> >
> >> >On Wed, Oct 17, 2012 at 3:11 PM, Steve Huston
> >> ><shuston@riverace.com>
> >> >wrote:
> >> >
> >> >> Rebuild the org.apache.qpid.messaging.dll in 32 bit mode?
> >> >>
> >> >> On 10/17/12 5:05 PM, "Rajesh Khan" <rajeshkhan808@gmail.com>
> >> >> wrote:
> >> >>
> >> >> >I built my org.apache.qpid.messaging.dll in VS2010 64 bit
> >> >> >mode. Now
> >> >>when I
> >> >> >am adding it as a reference to my C# project x86. I get the
> >> >> >following
> >> >> >error.
> >> >> >Any suggestions on how I could resolve this issue ?
> >> >> >
> >> >> >System.BadImageFormatException was unhandled
> >> >> >  Message=Could not load file or assembly
> >> >> >  'org.apache.qpid.messaging,
> >> >> >Version=1.0.4673.24043, Culture=neutral,
> >> >>PublicKeyToken=7e57166074abee8c'
> >> >> >or one of its dependencies. An attempt was made to load a
> >> >> >program with
> >> >>an
> >> >> >incorrect format.
> >> >> >  Source=QpidRx_CSharp
> >> >> >  FileName=org.apache.qpid.messaging, Version=1.0.4673.24043,
> >> >> >Culture=neutral, PublicKeyToken=7e57166074abee8c
> >> >> >  FusionLog==== Pre-bind state information ===
> >> >> >LOG: User = Adam-PC\Adam
> >> >> >LOG: DisplayName = org.apache.qpid.messaging,
> >> >> >Version=1.0.4673.24043,
> >> >> >Culture=neutral, PublicKeyToken=7e57166074abee8c
> >> >> > (Fully-specified)
> >> >> >LOG: Appbase =
> >> >> >file:///D:/qpid-0.18/TestProject/QpidRx_CSharp/QpidRx_CSharp/bin/Debug/
> >> >> >LOG: Initial PrivatePath = NULL
> >> >> >Calling assembly : QpidRx_CSharp, Version=1.0.0.0,
> >> >> >Culture=neutral,
> >> >> >PublicKeyToken=null.
> >> >> >===
> >> >> >LOG: This bind starts in default load context.
> >> >> >LOG: No application configuration file found.
> >> >> >LOG: Using host configuration file:
> >> >> >LOG: Using machine configuration file from
> >> >> >C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
> >> >> >LOG: Post-policy reference: org.apache.qpid.messaging,
> >> >> >Version=1.0.4673.24043, Culture=neutral,
> >> >>PublicKeyToken=7e57166074abee8c
> >> >> >LOG: Attempting download of new URL
> >> >>
> >> >>>file:///D:/qpid-0.18/TestProject/QpidRx_CSharp/QpidRx_CSharp/bin/Debug/o
> >> >>>rg
> >> >> >.apache.qpid.messaging.DLL.
> >> >> >ERR: Failed to complete setup of assembly (hr = 0x8007000b).
> >> >> >Probing
> >> >> >terminated.
> >> >> >
> >> >> >  StackTrace:
> >> >> >       at QpidRx_CSharp.Program.Main()
> >> >> >       at System.AppDomain._nExecuteAssembly(RuntimeAssembly
> >> >> >       assembly,
> >> >> >String[] args)
> >> >> >       at System.AppDomain.ExecuteAssembly(String
> >> >> >       assemblyFile,
> >> >>Evidence
> >> >> >assemblySecurity, String[] args)
> >> >> >       at
> >> >> >Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
> >> >> >       at
> >> >> >       System.Threading.ThreadHelper.ThreadStart_Context(Object
> >> >>state)
> >> >> >       at
> >> >> >       System.Threading.ExecutionContext.Run(ExecutionContext
> >> >> >executionContext, ContextCallback callback, Object state,
> >> >> >Boolean
> >> >> >ignoreSyncCtx)
> >> >> >       at
> >> >> >       System.Threading.ExecutionContext.Run(ExecutionContext
> >> >> >executionContext, ContextCallback callback, Object state)
> >> >> >       at System.Threading.ThreadHelper.ThreadStart()
> >> >> >  InnerException:
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> >> >> For additional commands, e-mail: users-help@qpid.apache.org
> >> >>
> >> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> >> For additional commands, e-mail: users-help@qpid.apache.org
> >>
> >>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message