The name 'InitializeComponent' does not exist in the current context
I am working on WPF application and it includes a usercontrol. I got this error when trying to build but I have checked the name space and can't find out why.
After googling the same error, I tried to add " " into project property file.
Refer: http://www.dev102.com/2008/01/14/how-to-solve-error-cs0103-the-name-initializecomponent-does-not-exist-in-the-current-context/
It doesn't work. Finally I just make some changes to the xaml file and it works:
Before:
x:Class="ManageUsers"
xmlns:my="clr-namespace:CliniqueMS"
.....>
After:
x:Class="CliniqueMS.ManageUsers"
xmlns:my="clr-namespace:CliniqueMS"
........>
Look like I give the full name space for the class tag then the complaint is gone.
The code behind file's name space is "CliniqueMS".
After googling the same error, I tried to add "
Refer: http://www.dev102.com/2008/01/14/how-to-solve-error-cs0103-the-name-initializecomponent-does-not-exist-in-the-current-context/
It doesn't work. Finally I just make some changes to the xaml file and it works:
Before:
xmlns:my="clr-namespace:CliniqueMS"
.....>
After:
xmlns:my="clr-namespace:CliniqueMS"
........>
Look like I give the full name space for the class tag then the complaint is gone.
The code behind file's name space is "CliniqueMS".
Comments