You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Todd Herman <to...@apx-labs.com> on 2012/04/13 16:54:36 UTC

Issue executing code on different machine

I compiled the latest version of the c++ qpid client/broker (from the repository).  I compiled it as a release version, not debug.  I then compiled the dotnet binding (org.apache.qpid.messaging.dll) also as release.  Everything works great and my code, using that dll, runs fine on the development machine.  For the record, I am compiling everything in Visual Studio 2010.

Now, I move my code (and all required files) to a different machine.  When the code tries to use the org.apache.qpid.messaging.dll my application crashes and I see this in the event log:

Activation context generation failed for "C:\Programming\APX-LABS SVN\Pvision_Server\com.apx-labs.components.Windshear\bin\Debug\org.apache.qpid.messaging.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.

Why is code compiled in VS 2010 as a release (not debug) using an older debug MSVC file?  Any suggestions on what I can do to overcome this?

[Description: Description: Description: C099A092-D672-44AE-BE50-B9C847BC176F]

Todd Herman
Senior Software Engineer

APX Labs
2350 Corporate Park Drive, Ste. 510 | Herndon, VA 20171
m: 703-489-8761 | www.apx-labs.com<http://www.apx-labs.com/> | @APXLabs




RE: Issue executing code on different machine

Posted by Todd Herman <to...@apx-labs.com>.
I know why the issue happens and what file it refers to but it didn't make sense that the Qpid library, compiled as a release version in VS 2010, would be requiring a debug version of the older runtime.

-----Original Message-----
From: Virgilio Fornazin [mailto:virgiliofornazin@gmail.com] 
Sent: Monday, April 16, 2012 11:38 AM
To: users@qpid.apache.org
Subject: Re: Issue executing code on different machine

This issue happens because Microsoft doesn't allow you to distribute debug libraries from C runtime.
See
http://social.technet.microsoft.com/Forums/zh/itproxpsp/thread/dbb413ef-3782-4a26-b540-8f3b3269cbe5

Algo, VC90.DebugCRT is related to a VS 2008 compiled file, not VS 2010 one.


On Mon, Apr 16, 2012 at 11:52, Chuck Rolke <cr...@redhat.com> wrote:

> Please check again which files you have copied to your target machine.
> From the Application Context error message the file is 
> bin\Debug\org.apache.qpid.messaging.dll which is Debug and not Release.
>
> Also check which assemblies your application has referenced. This is 
> made more difficult by the SxS services so you can't necessarily tell 
> what's going on just by static analysis. Further tools to use are from 
> a Visual Studio Command Prompt :
> * depends <dll or exe file>. This shows some of the static linkage of 
> DLL files.
> * sxstrace understands dynamic bindings and the SxS stuff. See 
> http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx
>
> -Chuck
>
> ----- Original Message -----
>
> > From: "Todd Herman" <to...@apx-labs.com>
> > To: users@qpid.apache.org
> > Sent: Friday, April 13, 2012 10:54:36 AM
> > Subject: Issue executing code on different machine
>
> > I compiled the latest version of the c++ qpid client/broker (from 
> > the repository). I compiled it as a release version, not debug. I 
> > then compiled the dotnet binding (org.apache.qpid.messaging.dll) 
> > also as release. Everything works great and my code, using that dll, 
> > runs fine on the development machine. For the record, I am compiling 
> > everything in Visual Studio 2010.
>
> > Now, I move my code (and all required files) to a different machine.
> > When the code tries to use the org.apache.qpid.messaging.dll my 
> > application crashes and I see this in the event log:
>
> > Activation context generation failed for "C:\Programming\APX-LABS
> >
> SVN\Pvision_Server\com.apx-labs.components.Windshear\bin\Debug\org.apache.qpid.messaging.dll".
> > Dependent Assembly
> >
> Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
> > could not be found. Please use sxstrace.exe for detailed diagnosis.
>
> > Why is code compiled in VS 2010 as a release (not debug) using an 
> > older debug MSVC file? Any suggestions on what I can do to overcome 
> > this?
>
> >
> > Description: Description: Description:
> > C099A092-D672-44AE-BE50-B9C847BC176F
> > Todd Herman
> > Senior Software Engineer
>
> > APX Labs
> > 2350 Corporate Park Drive, Ste. 510 | Herndon, VA 20171
> > m: 703-489-8761 | www.apx-labs.com | @APXLabs
>

Re: Issue executing code on different machine

Posted by Virgilio Fornazin <vi...@gmail.com>.
This issue happens because Microsoft doesn't allow you to distribute debug
libraries from C runtime.
See
http://social.technet.microsoft.com/Forums/zh/itproxpsp/thread/dbb413ef-3782-4a26-b540-8f3b3269cbe5

Algo, VC90.DebugCRT is related to a VS 2008 compiled file, not VS 2010 one.


On Mon, Apr 16, 2012 at 11:52, Chuck Rolke <cr...@redhat.com> wrote:

> Please check again which files you have copied to your target machine.
> From the Application Context error message the file is
> bin\Debug\org.apache.qpid.messaging.dll which is Debug and not Release.
>
> Also check which assemblies your application has referenced. This is made
> more difficult by the SxS services so you can't necessarily tell what's
> going on just by static analysis. Further tools to use are from a Visual
> Studio Command Prompt :
> * depends <dll or exe file>. This shows some of the static linkage of DLL
> files.
> * sxstrace understands dynamic bindings and the SxS stuff. See
> http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx
>
> -Chuck
>
> ----- Original Message -----
>
> > From: "Todd Herman" <to...@apx-labs.com>
> > To: users@qpid.apache.org
> > Sent: Friday, April 13, 2012 10:54:36 AM
> > Subject: Issue executing code on different machine
>
> > I compiled the latest version of the c++ qpid client/broker (from the
> > repository). I compiled it as a release version, not debug. I then
> > compiled the dotnet binding (org.apache.qpid.messaging.dll) also as
> > release. Everything works great and my code, using that dll, runs
> > fine on the development machine. For the record, I am compiling
> > everything in Visual Studio 2010.
>
> > Now, I move my code (and all required files) to a different machine.
> > When the code tries to use the org.apache.qpid.messaging.dll my
> > application crashes and I see this in the event log:
>
> > Activation context generation failed for "C:\Programming\APX-LABS
> >
> SVN\Pvision_Server\com.apx-labs.components.Windshear\bin\Debug\org.apache.qpid.messaging.dll".
> > Dependent Assembly
> >
> Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
> > could not be found. Please use sxstrace.exe for detailed diagnosis.
>
> > Why is code compiled in VS 2010 as a release (not debug) using an
> > older debug MSVC file? Any suggestions on what I can do to overcome
> > this?
>
> >
> > Description: Description: Description:
> > C099A092-D672-44AE-BE50-B9C847BC176F
> > Todd Herman
> > Senior Software Engineer
>
> > APX Labs
> > 2350 Corporate Park Drive, Ste. 510 | Herndon, VA 20171
> > m: 703-489-8761 | www.apx-labs.com | @APXLabs
>

RE: Issue executing code on different machine

Posted by Todd Herman <to...@apx-labs.com>.
I checked all that.  I spend a couple days going through everything and inspecting every file in the project.  Not being a C++ developer made this a little more difficult but I finally found something in the org.apache.qpid.messaging project, which is part of the dotnet binding solution.  In Properties->Linker->Debugging, "Generate Debug Info" and "Debuggable Assembly" were both set to "Yes" for the release version of the binding library.  I admit that I do not know what these do exactly but I didn't think it made sense to have anything "debug" related active for a release version.  I set them both to "No" and recompiled.  Doing this resolved the "side-by-side" issue that I was having.

-----Original Message-----
From: Chuck Rolke [mailto:crolke@redhat.com] 
Sent: Monday, April 16, 2012 10:53 AM
To: users@qpid.apache.org
Subject: Re: Issue executing code on different machine

Please check again which files you have copied to your target machine. From the Application Context error message the file is bin\Debug\org.apache.qpid.messaging.dll which is Debug and not Release. 

Also check which assemblies your application has referenced. This is made more difficult by the SxS services so you can't necessarily tell what's going on just by static analysis. Further tools to use are from a Visual Studio Command Prompt : 
* depends <dll or exe file>. This shows some of the static linkage of DLL files. 
* sxstrace understands dynamic bindings and the SxS stuff. See http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx 

-Chuck 

----- Original Message -----

> From: "Todd Herman" <to...@apx-labs.com>
> To: users@qpid.apache.org
> Sent: Friday, April 13, 2012 10:54:36 AM
> Subject: Issue executing code on different machine

> I compiled the latest version of the c++ qpid client/broker (from the 
> repository). I compiled it as a release version, not debug. I then 
> compiled the dotnet binding (org.apache.qpid.messaging.dll) also as 
> release. Everything works great and my code, using that dll, runs fine 
> on the development machine. For the record, I am compiling everything 
> in Visual Studio 2010.

> Now, I move my code (and all required files) to a different machine.
> When the code tries to use the org.apache.qpid.messaging.dll my 
> application crashes and I see this in the event log:

> Activation context generation failed for "C:\Programming\APX-LABS 
> SVN\Pvision_Server\com.apx-labs.components.Windshear\bin\Debug\org.apache.qpid.messaging.dll".
> Dependent Assembly
> Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
> could not be found. Please use sxstrace.exe for detailed diagnosis.

> Why is code compiled in VS 2010 as a release (not debug) using an 
> older debug MSVC file? Any suggestions on what I can do to overcome 
> this?

> 
> Description: Description: Description:
> C099A092-D672-44AE-BE50-B9C847BC176F
> Todd Herman
> Senior Software Engineer

> APX Labs
> 2350 Corporate Park Drive, Ste. 510 | Herndon, VA 20171
> m: 703-489-8761 | www.apx-labs.com | @APXLabs

Re: Issue executing code on different machine

Posted by Chuck Rolke <cr...@redhat.com>.
Please check again which files you have copied to your target machine. From the Application Context error message the file is bin\Debug\org.apache.qpid.messaging.dll which is Debug and not Release. 

Also check which assemblies your application has referenced. This is made more difficult by the SxS services so you can't necessarily tell what's going on just by static analysis. Further tools to use are from a Visual Studio Command Prompt : 
* depends <dll or exe file>. This shows some of the static linkage of DLL files. 
* sxstrace understands dynamic bindings and the SxS stuff. See http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx 

-Chuck 

----- Original Message -----

> From: "Todd Herman" <to...@apx-labs.com>
> To: users@qpid.apache.org
> Sent: Friday, April 13, 2012 10:54:36 AM
> Subject: Issue executing code on different machine

> I compiled the latest version of the c++ qpid client/broker (from the
> repository). I compiled it as a release version, not debug. I then
> compiled the dotnet binding (org.apache.qpid.messaging.dll) also as
> release. Everything works great and my code, using that dll, runs
> fine on the development machine. For the record, I am compiling
> everything in Visual Studio 2010.

> Now, I move my code (and all required files) to a different machine.
> When the code tries to use the org.apache.qpid.messaging.dll my
> application crashes and I see this in the event log:

> Activation context generation failed for "C:\Programming\APX-LABS
> SVN\Pvision_Server\com.apx-labs.components.Windshear\bin\Debug\org.apache.qpid.messaging.dll".
> Dependent Assembly
> Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
> could not be found. Please use sxstrace.exe for detailed diagnosis.

> Why is code compiled in VS 2010 as a release (not debug) using an
> older debug MSVC file? Any suggestions on what I can do to overcome
> this?

> 
> Description: Description: Description:
> C099A092-D672-44AE-BE50-B9C847BC176F
> Todd Herman
> Senior Software Engineer

> APX Labs
> 2350 Corporate Park Drive, Ste. 510 | Herndon, VA 20171
> m: 703-489-8761 | www.apx-labs.com | @APXLabs