469,275 Members | 1,871 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

Reference to an .exe

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?

Nov 17 '05 #1
4 8227
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.
--------------------

Nov 17 '05 #2
Jon
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.
"Gary Chang" <v-******@online.microsoft.com> wrote in message news:OL**************@cpmsftngxa07.phx.gbl...
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.
--------------------

Nov 17 '05 #3
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.
--------------------

Nov 17 '05 #4
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.
--------------------

Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Abe Frohnman | last post: by
4 posts views Thread by z_learning_tester | last post: by
13 posts views Thread by al.cpwn | last post: by
51 posts views Thread by Kuku | last post: by
27 posts views Thread by David W | last post: by
41 posts views Thread by Summercool | last post: by
275 posts views Thread by Astley Le Jasper | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.