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

  1. create solution
  2. add projects
  3. in project 2 right click on references in solution explorer , hit add reference

    ^^^^^this step missed^^^^

  4. in collumn on left of popup click solution
  5. choose project one
  6. add using or xmlns in code project one
  7. reference project one's code

Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -