Hi,
I want to import some classes I wrote from one windows forms project to another.
I thought I could just take the class file and move it into the appropriate position in the other project. But for some reason the new class will no show up in the solutions explorer.
I hit rebuild project and nothing shows up.
Does anyone have any suggestions on this matter?
Thanks!
Visual studio new class
Page 1 of 14 Replies - 3755 Views - Last Post: 02 December 2012 - 10:48 AM
Replies To: Visual studio new class
#2
Re: Visual studio new class
Posted 01 December 2012 - 12:58 PM
When we say 'move' what are you really saying?
Also how many class files are we talking about here?
Also how many class files are we talking about here?
#3
Re: Visual studio new class
Posted 01 December 2012 - 01:32 PM
in your target (new) solution...
Right-click on the project.
Choose add existing...
Navigate to the file(s) you want to import
select them
You can then either add and they will be copied to the new solution, or click the little triangle and choose add as link and they won't be copied just linked to.
The advantage of a link is that if you make improvements then any other project using those same files will see the updates the next time the project is opened. I often do this when building up a namespace or DLL but I know its not complete.
Right-click on the project.
Choose add existing...
Navigate to the file(s) you want to import
select them
You can then either add and they will be copied to the new solution, or click the little triangle and choose add as link and they won't be copied just linked to.
The advantage of a link is that if you make improvements then any other project using those same files will see the updates the next time the project is opened. I often do this when building up a namespace or DLL but I know its not complete.
#5
Re: Visual studio new class
Posted 02 December 2012 - 10:48 AM
When I import the classes into my project, they show up in the solutions explorer.
But when I try to instantiate an instance of one of these classes, they are not recognized...
EDIT:
I had to change the namespace on the top of each class.
But when I try to instantiate an instance of one of these classes, they are not recognized...
EDIT:
I had to change the namespace on the top of each class.
This post has been edited by Ap0C552: 02 December 2012 - 10:56 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|