[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


WinForms Solution with Multiple Projects

Posted on 2012-08-28
Medium Priority
Last Modified: 2012-08-28
I'm building a solution that has a primary project, and I want to add multiple "child" projects.

Currently, the child project is seperate, I compile the class into a DLL, copied the dll over to the main solution, referenced it, included in project and everything works fine.

My question is...

If I add the child project...and have it compile to the Solution Bin directory...will it be "seen" correctly?

And how do I deploy the executable so that the the compiled dll doesn't have to go with it?
Question by:lrbrister
  • 2
  • 2

Expert Comment

ID: 38341359
If you add the child project to the solution you should change the refereces of the main project. Instead of referece a dll the main project should refereces a project (the child one)

Then, every time you compile the solution, you will have the "current" child dll.

Otherwise, the project is not going to see the dll.
LVL 83

Expert Comment

ID: 38341446
One option, as described above, is to use a Project reference instead of assembly reference if both projects are in same solution. If you don't want to do that, you can add code in PostBuild event so that newly compiled dll is copied to your primary project's Bin folder.

>And how do I deploy the executable so that the the compiled dll doesn't have to go with it?

Not sure what you mean.

Author Comment

ID: 38341909

I guess what I'm asking is...
On a basic build where an exe is built and the dll is referenced.

Do they both need to be copied to a Client PC?
Or just the exe?

You've been a tremendous help over the years as I've gotten better and better in Web Apps.

I'm in a job now where I may need to build WinForm apps
LVL 83

Accepted Solution

CodeCruiser earned 2000 total points
ID: 38342050
Yes you need to copy the DLL as well to the target machine. Simplist way is to keep the DLL in same folder as exe.

Author Closing Comment

ID: 38342062

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question