Reputation: 131
I am using visual studio for this. I have test project which generates a dll and runs the different tests everytime I build the project. Now i want to write a console application which generates an exe that consumes the dll generated above. Can I do it using dllImport? If yes, please tell me how?
Upvotes: 0
Views: 1275
Reputation: 11426
You just need to:
Now when you build the solution the library project will built first and its .dll will automatically be included in the bin directory of you console project. The advantage of doing this instead of referencing just the built .dll is you can modify and debug the source of your library project, e.g. step into it's methods.
However you can just do the second step and instead of adding a reference to your project browse to to the built .dll and add that as a reference.
Upvotes: 2
Reputation:
You can add reference :
In Solution Explorer, right-click the project node and click Add Reference.
In the Add Reference dialog box, select the tab indicating the type of component you want to reference.
Select the components you want to reference, and then click OK.
Upvotes: 0
Reputation: 4487
You can either
OR
Upvotes: 0