Reference to an .exe

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

I am developing a 'addin.dl'l to a 'main.exe'. How can I add a reference to 'addin.dll project' for the main.exe?

Currently I am renaming a copy of main.exe to main.dll and adding that to my references. Anything simpler?
 
Hi Jon,

Thanks for posting in the community.

From your description, I understand that you want to add an exe refenrence
to your project.
Please correct me if there is any misunderstand.

In .Net development platform, only a valid assembly or a COM component can
be referenced, so does your exe contain a valid COM component? If it have,
maybe you can Add Reference with the COM sub tab by browsing manually.

BTW, how about Add Reference to the exe's project?


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
The .exe is a pure C# compiled.exe. Changing the extension to .dll is the only way I found to add it to the references of another
..dll project. Any reason why the IDE will not let me add it while it is an .exe?

Also Add Reference to the exe's project is not allowed.
 
Hi Jon,

Thanks for your quickly reply!
Any reason why the IDE will not let me add it while it is an .exe?

I think the VS.NET only accepts an assembly of class library(.DLL) as a
valid reference type.


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
Hi Jon,

One of my colleagues has found a way to add a .exe reference to the DLL
project:

You could use the #using in MC++. Something like:
#using <myApp.exe>

Or manually add it to the compiler. Something like:
/Fu myApp.exe

He did a quick test and in MC++ (2003) and can add a reference to a C# EXE
through the Add References dialog. It seems to build and work fine.

Then however you will have a problem when you use the MC++ DLL in C#
because C#'s Add Reference Dialog does not allow you to add the exe and
does not copy it as a dependent assembly. If you manually copy over the
exe to the C# bin directory then everything seems to work fine.

By the way, he has a sample project that illustrated this, if you want, I
can email it to you.


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
Back
Top