How to find one executable from another

  • Thread starter Thread starter Gregory Khra
  • Start date Start date
G

Gregory Khra

I need to use the namespace defined in file1.exe in the file2.exe. So far it
worked as long as both files were in the same folder. Now I need to move one
of them. I added app.config (below) to the second file with the following
text, but it did not work. Can somebody help? Maybe there is another way to
discover file1.exe from file2.exe at runtime (file1 path is available)

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="file1"/>
<codeBase version="1.42.6.0"
href="C:\mypath\file1.exe"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Note: assembly name and version are correct.
 
I am not sure I understand. Why can't you move a local copy of the assembly
to the other project?

Also, since both of these are exes, are you trying to get one to run from
the other or just using its bits?

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

********************************************
| Think outside the box! |
********************************************
 
Cowboy (Gregory A. Beamer) said:
Why can't you move a local copy of the assembly
to the other project?

I am trying to reuse the object from one project in another project. Moving
this object into a DLL will involve serious redesign because it refers to
other objects that cannot be moved. For the same reason I cannot reuse the
source code. But I can simply use the namespace from the first project (first
..exe) in the second .exe, it allows me to create the object I need. At design
time I inlude the reference in my second project, but at runtime I need
something else, like .config.
P.S. Something was wrong with my profile, it would not let me reply. I had
to create a different profile, but it's still the same person.
 
Back
Top