Connecting Tech Pros Worldwide Forums | Help | Site Map

Setting reference to an exe

guy
Guest
 
Posts: n/a
#1: Nov 22 '05
I have a solution with 3 projects, 2 are class libraries and 1 is a winforms
exe.
In one of the class libraries I need to refer to a windows form contained in
the winforms exe, however when I try to set the reference I get an error as
references can only be set to a dll.
Any ideas/workrounds?

cheers
guy

Sijin Joseph
Guest
 
Posts: n/a
#2: Nov 22 '05

re: Setting reference to an exe


I think you are trying to set file references, when you are setting
references for projects in your own solution then you should set project
references.

In the references dialog, select the projects tab and then select the
WinForms project to set the reference.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph



guy wrote:[color=blue]
> I have a solution with 3 projects, 2 are class libraries and 1 is a winforms
> exe.
> In one of the class libraries I need to refer to a windows form contained in
> the winforms exe, however when I try to set the reference I get an error as
> references can only be set to a dll.
> Any ideas/workrounds?
>
> cheers
> guy[/color]
Jon Skeet [C# MVP]
Guest
 
Posts: n/a
#3: Nov 22 '05

re: Setting reference to an exe


Sijin Joseph <sijinNOSPAMdotnet@hotmail.com> wrote:[color=blue]
> I think you are trying to set file references, when you are setting
> references for projects in your own solution then you should set project
> references.
>
> In the references dialog, select the projects tab and then select the
> WinForms project to set the reference.[/color]

Unfortunately you can't do this in VS.NET (2002 or 2003, at least).
There's nothing in .NET itself which stops an assembly from referencing
an executable rather than a library, but VS.NET doesn't like it :(

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Closed Thread