in 2003, how can add exe file as a reference in other project

I have one solution

contains three project, how can I add tow of them as a arefrence in the One left




Answer this question

in 2003, how can add exe file as a reference in other project

  • horatiu

    Change the project type to class library in the project B properties. Rebuild the solution and it will create a dll for you. Add a reference to dll you created for project b


  • Darshan Pandit

    yes, I have done this, but there is an error message shown

    it is :

    A reference to 'C:\...........................\bin\test.exe' could not added. This is not a valid assembley or COM componenet. Only assemblies with extiontion 'dll' and COM componenets can be reference, Please make sure that the file is accessible, and it is a valid assembly or COM compomemts.



  • John avis

    I have a soultion contains multi project,, How Can I call form1 from project A from Form1 in Project B !!

    I mean How Can I connect them together ..

    that is my idea.



  • Simon M

    Sorry, I'm not being clear (and I just realized that you said 2003, not 2005). Adding a reference to an EXE won't do anything useful, and I don't believe that you would be able do it in 2003. (I can, for some reason, add a project-to-project EXE-to-EXE reference in 2005, but as such references aren't useful, it's to no purpose.)

    --Matt--*



  • Gil Kozlowski

    Hi, Romantic_touch,

    You can add an EXE as a reference to another EXE through the normal way, but it doesn't really buy you anything since you can't get at the classes and methods in the EXE. If you need to reference code that exists in a different EXE, then it's best to factor that code out into its own class library project and add the class library as a reference to both projects. (Just to review how this is done: right-click on EXE and choose "Add Reference..." Then, in the dialog that comes up, click the "Projects" tab, and select the project that you want to add as a reference.)

    Hope this helps,

    --Matt--*



  • in 2003, how can add exe file as a reference in other project