Setting reference to an exe

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • guy

    #1

    Setting reference to an exe

    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

    #2
    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





    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]

    Comment

    • Jon Skeet [C# MVP]

      #3
      Re: Setting reference to an exe

      Sijin Joseph <sijinNOSPAMdot net@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.co m>
      Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

      If replying to the group, please do not mail me too

      Comment

      Working...