Visual Studio 2013: How to reference project folders in Using

Asked

Viewed 73 times

2

I have a problem,I have in the same project the stock and the box,I am making a screen that allows you to choose between them and depending on the button you press it opens one of the two.

However to avoid confusion BLL2, DAL2, GUI2 and Modelo2 were made inside a Project Folder called Box.

The point is that in the following code,I was unable to identify how to use Using to say that I am using GUI2 in this code. As it is inside a Folder I did not find command for such.

Screenshot do Visual Studio

  • These numbered names are already made to create confusion. Actually I can not say well where the problem is, because there is not enough information in the question to identify. Where is the frmPrincipal2? The problem is in him. It’s in GUI2? This namespace exists in this project? Fez using GUI2? If it does not exist in this one, is the project where it exists referenced in this one? Is it the case of having this separation even? It seems to me that it is generating more confusion when the intention was to decrease.

1 answer

1


You do not add a reference to the folder but to the projects. If the folder has 5 projects, there will be 5 "includes".

You need to click the button on References, then in Add and go on tab Solution. There will appear all the projects of your solution.

And to use the classes created in an external project, just add the using with the name of the namespace this class belongs to. Ex.: using BLL2.Models.Cliente.

See below, the project Admin has as reference the project Common that is in the same Solution.

Inserir referência ao projeto da solution

  • Thank you very much jbueno, as always my savior,vc is absolutely right,I forgot that I did not add them in the References,was a silly mistake,Thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.