Additional dependencies don′t work?? 
Author Message
 Additional dependencies don′t work??

Hi,

Im currently working on exposing unmanaged c++ classes as managed classes
and am having problems with my dependencies.  Im working with VS.NET RC1 on
WinXP Pro.  The unmanaged classes use 3rd party .lib files which I add to
the Configuration Properties->Linker->Input->Additional Dependencies box
(and am assuming that this one is what was in Link->Object/Library modules
VC++6) .  The path to these files leads to a network share on my intranet.
This path has been added to the Tools->Options...->Project->VC++
Directories->Library files and there is also an entry for this library path
in the environment PATH variable on my system.  Now, the way it worked on
WinNT was that I could copy my DLL, which made use of the 3rd party .libs,
to any directory and use it from there.  What happens now is that I can only
use my Managed C++ DLL if the .libs are in the application path??  Is this
by design?

I could really use some help on this one.

Cordially,
Dadi.



Mon, 24 May 2004 22:34:34 GMT  
 Additional dependencies don′t work??
At build time, lib files just need to be on the path for the linker in the
project properties, or set in the Tools-Options like you have done. However,
at run time, Managed DLL's need to be next to the EXE, listed in the App
Config file,  or in the GAC. Managed DLL's don't follow the same rules as
old school DLL's where they can be in System32, or on your path.

Not sure what you mean by use your Managed C++ Dll's if the libs are in the
application path. .libs are not used at run time, only at build time.

--
Brick
VC++ Project Model

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved

Quote:

> Hi,

> Im currently working on exposing unmanaged c++ classes as managed classes
> and am having problems with my dependencies.  Im working with VS.NET RC1
on
> WinXP Pro.  The unmanaged classes use 3rd party .lib files which I add to
> the Configuration Properties->Linker->Input->Additional Dependencies box
> (and am assuming that this one is what was in Link->Object/Library modules
> VC++6) .  The path to these files leads to a network share on my intranet.
> This path has been added to the Tools->Options...->Project->VC++
> Directories->Library files and there is also an entry for this library
path
> in the environment PATH variable on my system.  Now, the way it worked on
> WinNT was that I could copy my DLL, which made use of the 3rd party .libs,
> to any directory and use it from there.  What happens now is that I can
only
> use my Managed C++ DLL if the .libs are in the application path??  Is this
> by design?

> I could really use some help on this one.

> Cordially,
> Dadi.



Tue, 25 May 2004 02:34:02 GMT  
 Additional dependencies don′t work??



Quote:
> At build time, lib files just need to be on the path for the linker in the
> project properties, or set in the Tools-Options like you have done.
However,
> at run time, Managed DLL's need to be next to the EXE, listed in the App
> Config file,  or in the GAC. Managed DLL's don't follow the same rules as
> old school DLL's where they can be in System32, or on your path.

  Can you still explicitly load them using the full path?

--
Mike Swaim

Disclaimer: Yeah, like I speak for Enron



Tue, 25 May 2004 02:41:15 GMT  
 Additional dependencies don′t work??
Mike,

Quote:

>   Can you still explicitly load them using the full path?

Usually, yes, but I think that can be controlled by security policies. Note
also that they don't _have_ to be in the same directory as the .exe... the
search path can be overriden on an application-by-application basis with
application configuration files.

--
Tomas Restrepo



Tue, 25 May 2004 07:38:29 GMT  
 Additional dependencies don′t work??
Hi,

And thanks for the answer.  Yeah, I know how assemblies get resolved, but in
my case I seemed unable to load a particular assembly without having its
dependent files in the loading applications path!  Anyway, it was a pretty
dimwitted assumption on my part to think that it had anything to do with the
.lib files, because it naturally had to do with .dlls that my assembly links
in at runtime.  This all works like a charm now so, thanks again ;)

Cordially,
Dadi.



Quote:
> At build time, lib files just need to be on the path for the linker in the
> project properties, or set in the Tools-Options like you have done.
However,
> at run time, Managed DLL's need to be next to the EXE, listed in the App
> Config file,  or in the GAC. Managed DLL's don't follow the same rules as
> old school DLL's where they can be in System32, or on your path.

> Not sure what you mean by use your Managed C++ Dll's if the libs are in
the
> application path. .libs are not used at run time, only at build time.

> --
> Brick
> VC++ Project Model

> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
> reserved


> > Hi,

> > Im currently working on exposing unmanaged c++ classes as managed
classes
> > and am having problems with my dependencies.  Im working with VS.NET
RC1
> on
> > WinXP Pro.  The unmanaged classes use 3rd party .lib files which I add
to
> > the Configuration Properties->Linker->Input->Additional Dependencies box
> > (and am assuming that this one is what was in Link->Object/Library
modules
> > VC++6) .  The path to these files leads to a network share on my
intranet.
> > This path has been added to the Tools->Options...->Project->VC++
> > Directories->Library files and there is also an entry for this library
> path
> > in the environment PATH variable on my system.  Now, the way it worked
on
> > WinNT was that I could copy my DLL, which made use of the 3rd party
.libs,
> > to any directory and use it from there.  What happens now is that I can
> only
> > use my Managed C++ DLL if the .libs are in the application path??  Is
this
> > by design?

> > I could really use some help on this one.

> > Cordially,
> > Dadi.



Tue, 25 May 2004 17:41:49 GMT  
 Additional dependencies don′t work??
Yes, this was noted in my response above, however, the one caveat is the
AppConfig file can only point to DLL's that are under subdirectories of the
EXE. So, you can't have an EXE on D: and the DLL on C: like you can do with
old style DLL's.

--
Brick
VC++ Project Model

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved


Quote:
> Mike,

> >   Can you still explicitly load them using the full path?

> Usually, yes, but I think that can be controlled by security policies.
Note
> also that they don't _have_ to be in the same directory as the .exe... the
> search path can be overriden on an application-by-application basis with
> application configuration files.

> --
> Tomas Restrepo




Wed, 26 May 2004 02:46:59 GMT  
 Additional dependencies don′t work??
Hi guys,

Sadly, my dependencies problems are not over and now Im quite stuck with my
MC++

DLL.

My scenario is like this:

Im developing on a WinXP machine with VS.NET RC1 installed.  The problems

Im having stem from an MC++ DLL that I built.  This DLL uses unmanaged

classes and these classes use a 3rd party lib, specifically Rogue Wave(RW).

Some of the RW code is dynamically linked in and those DLLs are on a network
share and are referenced in my computers system PATH environment variable.

Now, when I first built my DLL I tested it with a simple C# WinForms app.

At first I got the error message "File or assembly name 'my-assembly-name',

or one of its dependencies, could not be found."!!

Then I copied the DLLs from the network share to the WinForms

app directory and then it started to work.  Later, though, I deleted the

DLLs from the app directory and the test app still worked??  Looked like

then it was using the DLLs from the network share!?

Anyway, I now reference and use my MC++ DLL in a web service which is the

"end-user" for my library.  Here I could not test the service, add a new web
reference to it or update the old ones without getting this same error
message:  "File or assembly name 'my-assembly-name', or one of its
dependencies, could not be found."!!

I tried the same trick here of course, to copy the DLLs from the network
share to the bin directory for the web service, but that doesnt seem to
have any effect!!??!

Now, a day later, I tried another silly trick which was to copy the DLLs to
the download cache for ASP.NET and then I was able to update the web
references and build my client.  But, alas, now when I try to run it I get
an error message saying:  "System.Web.Services.Protocols.SoapException:
System.Web.Services.Protocols.SoapException: Server was unable to process
request. ---> System.AppDomainUnloadedException: Attempted to access an
unloaded AppDomain." !!!  This happens when the unmanaged C++ code tries to
communicate with another app through a simple socket.  Is this a permissions

problem?

This thing is a total showstopper for me and I cant move forward with my

web service or my MC++ library until I get this fixed.

Please help me.

Cordially,

Dadi.



Quote:
> Yes, this was noted in my response above, however, the one caveat is the
> AppConfig file can only point to DLL's that are under subdirectories of
the
> EXE. So, you can't have an EXE on D: and the DLL on C: like you can do
with
> old style DLL's.

> --
> Brick
> VC++ Project Model

> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
> reserved



> > Mike,

> > >   Can you still explicitly load them using the full path?

> > Usually, yes, but I think that can be controlled by security policies.
> Note
> > also that they don't _have_ to be in the same directory as the .exe...
the
> > search path can be overriden on an application-by-application basis with
> > application configuration files.

> > --
> > Tomas Restrepo




Wed, 02 Jun 2004 01:26:12 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Additional dependencies don′t work??

2. ACCELERATOR KEYS DON'T WORK WITH OnKeyDown BUT WORK WHEN SPY++ IS RUNNING

3. Additional include directories do not work

4. MIDL2361 error - [vararg] with [optional] parameters don't work in VC++ .NET

5. VC7.0: class template using declarations don't work

6. Discovered the root of my problem...Why don't RichEditControls work on .NET

7. outportb: why don't work?

8. flush stdout don't work

9. why don't this work

10. printf, puts, gets etc don't work when stepping into

11. Imposed indentation standards don't work

12. Waiting uninterruptible in Win95 (sleep() don't work)

 

 
Powered by phpBB® Forum Software