c# - Getting reference error on naming controls - WPF -
i have solution named solution1, has multiple projects named project1, project2 etc. in project1, have usercontrol called "designelement". when name usercontrol xaml, using "x:name" , compile it, following compile error:
"the type or namespace name 'project2 ' not exist in namespace 'solution1.project1.project2' (are missing assembly reference?)"
where reference of project2 coming in project1? why compile error arise? also, if not going use "x:name" in controls, solution compiles , runs fine. on same appreciated.
just because have 2 projects in same solution doesn't mean can instantly see each other.
here proper flow making them see each other
- create solution
- add projects
in project 2 right click on references in solution explorer , hit add reference
^^^^^this step missed^^^^
- in collumn on left of popup click solution
- choose project one
- add using or xmlns in code project one
- reference project one's code
Comments
Post a Comment