Reputation: 67
I know this questions has been asked a lot and I read pretty much all of the answers. I even checked .NET versions and they are same. I wrote a Rectangle class in project called Problem1 (namesapce Problem1) and wanted to use it in another project Problem2. I added using Problem1 and it immediately got red saying:
"type or namespace name could not be found"
Now I compared mine solution to a working one, which is written exactly the same, yet mine is not working. What can I do to fix this?
Upvotes: 1
Views: 63
Reputation: 2413
You have to add a reference to the project Problem1 in project Problem2
In solution Explorer:
1- right click on Project Problem2 and click on add reference
2- In the dialog that appears in the left pane click on Solution
3- In projects that appear after clicking the solution, select the project Problem1
4- click ok
Upvotes: 3