Pretty stupid question

  • Thread starter Thread starter Justin Lazanowski
  • Start date Start date
J

Justin Lazanowski

I have been handed a program that someone else wrote to preform simple
maintenance on. I had a request to fix a minor bug, so I checked the program
out of Source Safe and attempted to just build it.

When I do, I get a build error

Could not find type 'MyProject.MyControl'. Please make sure that the
assembly that contains this type is referenced. If this type is a part of
your development project, make sure that the project has been successfully
built.


The previous programmer had created a user control that is refrenenced all
over this program, it is part of the same namespace.

My thought is that it needs to be complied before the rest of the pages in
the program and that is not happening.

Anyone got a quick way to fix this?

Thanks,
Justin
 
Did you get latest of the entire solution? If so, then does the control
exist in one of the projects there?

Simply right click that project, and build it. After that, you should be
able to build the current project without any problems.
 
Yes the code for this user control is there, however it's a form (or user
control) within the main project. It is not a seperate project. When I right
click on the control there is not an option to build it.
 
You can't build the control separately from the project, if it IS part of
the project. It seems that there is a problem with the name reference to the
control class in the rest of the project. Check the name references against
the name of the control class.

If you're using Visual Studio.Net, you can go to the Class View pane and see
the control class in its namespace context.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
Justin Lazanowski said:
Yes the code for this user control is there, however it's a form (or user
control) within the main project. It is not a seperate project. When I
right click on the control there is not an option to build it.

Look at the user control in code view. Is the namespace the same as the
MyProject in 'MyProject.MyControl' and is the class name 'MyControl'?

SP
 
Back
Top