I have a solution that contains both a Windows Forms application and a Console application.
I have some functionality in the Windows Forms application that I would like to use in the Console application without manually copying and pasting the code into a second location.
Is there anyway to access a class/methods in the Windows Forms application from a Console application? Or would I need to extract the functionality into its own .dll and reference that from both projects…
i.e. both use the same common code project in their solutions, and both reference the project. Alternatively, if you are already happy with the common code. Compile it as a separate solutions (c claas library) and then reference the dll in both. Both end up the same thing – a dll in the bin folder.