Invoke Error

B

Boni

Dear all,
I am trying to dynamically create the instance
(withActivator.CreateInstance) of cManop class
This class uses as reference Dep4Man class.
But somehow at the invokation time I get a exception, that Dep4Man class
couldn't be found. The class is regersered with regasm Dep4Man.dll /codebase
But the shown Appbase is not as it should be!!!
May be somebody has an idea, what could be wrong?
Thanks,
Boni


System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. ---> System.IO.FileNotFoundException: ?
File name: "Dep4Man"
at cManop.cManop..ctor()

=== Pre-bind state information ===
LOG: DisplayName = Dep4Man, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=f15b37290cce9538
(Fully-specified)
LOG: Appbase = c:\Programme\Microsoft Visual Studio .NET 2003\Common7\IDE\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===

LOG: Private path hint found in configuration file:
PublicAssemblies;PrivateAssemblies.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/Dep4Man.DLL.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/Dep4Man/Dep4Man.DLL.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/PublicAssemblies/Dep4Man.DLL.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/PublicAssemblies/Dep4Man/Dep4Man.DLL.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/PrivateAssemblies/Dep4Man.DLL.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/PrivateAssemblies/Dep4Man/Dep4Man.DLL.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/Dep4Man.EXE.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/Dep4Man/Dep4Man.EXE.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/PublicAssemblies/Dep4Man.EXE.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/PublicAssemblies/Dep4Man/Dep4Man.EXE.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/PrivateAssemblies/Dep4Man.EXE.
LOG: Attempting download of new URL file:///c:/Programme/Microsoft Visual
Studio .NET 2003/Common7/IDE/PrivateAssemblies/Dep4Man/Dep4Man.EXE.

--- End of inner exception stack trace ---
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
 
D

Dave

The framework cannot locate that assembly. Dep4Man.dll can be placed in the GAC to solve this problem, but make sure that you
remember it's in there... if you make changes to the assembly you should ensure that your projects are building against the updated
Dep4Man.dll and not the GAC version.

Instead, you may want to try adding the correct path of the Dep4Man.dll in your Project Properties dialog:

Project Properties Dialog --> Common Properties --> Reference Paths --> Add...
 
B

Boni

Hi Dave,
I wouldn't like to place it to GAC. And there is not possible to set
reference path to compile time. What is the way of proper registration?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top