Could not load file or assembly 
Author Message
 Could not load file or assembly

I posted on a similar matter back in May when I was having problem
developing.  Im not deplying and the same problem is rearing its head and Im
getting inconsistent results accross machines.

The scenario can bbe summarised as follows
My application is a vb6 standard exe.  This is installed into
C:\Program Files\MyApp.  
This application needs to interact with a third-party app which is a dot net
assembly and is installed to
C:\Program Files\ThirdPartyApp
A dot net dll MyApp.Interop.dll has been developed (by third party) to allow
MyApp to communicate with ThirdPartyApp.  
On PC1 I can run MyApp from its install dir and the interoperation between
the two systems is fine.
On PC2 I get the error "Could not load file or assembly ..." unless I place
MyApp.exe into ThirdPartyApp directory

I have run regasm on the MyApp.Interop.dll assembly on both pcs but this
does not seem to have made any difference.  The dot net assemblies have not
been strongly named so I cannot install into GAC (I have read that this would
probably solve the problem).  

Id appreciate help on this as I need to have a robust rollout plan in place
by the end of the week

Previous thread:
http://www.*-*-*.com/



Fri, 10 Dec 2010 19:54:00 GMT  
 Could not load file or assembly
Hi Terry,

As per my last post in the previous thread, you should run Fuslogvw.exe and
set it to
log all binding. Then you can see where it is binding to the assemblies on
the machine where it is working and where it is looking on the machine when
it fails. If you do not sign the assemblies (strong naming), then the
binding path will be limited to sub-directories of the application.  How you
are getting it to work on PC1 without these conditions is indeed strange. I
suggest you look at fuslogvw.exe to see why that is working. But for robust
deployment either (a) sign the assemblies, and then you can setting a
binding path in a config file or register them in the GAC, or (b) place them
in the same folder or a sub folder of your app.


Quote:
>I posted on a similar matter back in May when I was having problem
> developing.  Im not deplying and the same problem is rearing its head and
> Im
> getting inconsistent results accross machines.

> The scenario can bbe summarised as follows
> My application is a vb6 standard exe.  This is installed into
> C:\Program Files\MyApp.
> This application needs to interact with a third-party app which is a dot
> net
> assembly and is installed to
> C:\Program Files\ThirdPartyApp
> A dot net dll MyApp.Interop.dll has been developed (by third party) to
> allow
> MyApp to communicate with ThirdPartyApp.
> On PC1 I can run MyApp from its install dir and the interoperation between
> the two systems is fine.
> On PC2 I get the error "Could not load file or assembly ..." unless I
> place
> MyApp.exe into ThirdPartyApp directory

> I have run regasm on the MyApp.Interop.dll assembly on both pcs but this
> does not seem to have made any difference.  The dot net assemblies have
> not
> been strongly named so I cannot install into GAC (I have read that this
> would
> probably solve the problem).

> Id appreciate help on this as I need to have a robust rollout plan in
> place
> by the end of the week

> Previous thread:
> http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?qu...



Fri, 10 Dec 2010 20:31:41 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can not load file or assembly

2. could not load file or assembly

3. "File or Assembly not found"

4. File or assembly name ADODB, or one of its dependencies, was not found

5. Load Assembly /CreateInstance

6. Load Assembly

7. One or more of the types in the assembly unable to load

8. How do I load and run assemblies dynamically

9. Dynamically loading an assembly?

10. Loading control from assembly

11. Trying to Dunamically Load Assembly via Reflection

12. Loading an assembly at runtime

 

 
Powered by phpBB® Forum Software