I get an error while compiling:
'SimulatorUi.MainWindow' does not contain a definition for 'UserCtrlSimulator' and no extension method 'UserCtrlSimulator' accepting a first argument of type 'SimulatorUi.MainWindow' could be found (are you missing a using directive or an assembly reference?)
I got this error while compiling a user control and its owning window in the same project.
Why ?
The problem is the naming of the userControl in its owning Window. I named as:
Name="UserCtrlSimulator"
instead of:
x:Name="UserCtrlSimulator"
You can find the bug and a more useful error message by removing the reference of that badly named object (remove any reference to the object named without the "x:").
I can't tell the exact reason why it is like this ??? But my solution works fine.
Hope it can help anybody because I lost a lots of time with this weird bug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With