Error when resolving missing XAML namespaces

This bug is in R# since v7, maybe it was there even in v6, not sure.When pasting code into xaml file, sometimes the missing namespaces are are not recognized properly and I have to add them manually.  
How to reproduce this scenario:  

Create new empty Windows Phone 7 project. There is already empty MainPageAdd new Pivot page.  
Copy the <Grid>...</Grid> from the Pivot page and paste it into the Main page instead of the original Grid tag.  

dialog for adding missing namespaces shows up,I press Alt-Enter, I expect missing namespace is added for the controls:Pivot and controls:PivotItem  

when I press Alt + Enter, it changes these tags to phone:Pivot and phone:PivotItem where phone is  
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"  
but is should instead add the namespace  
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"  

Tested in VS2012 and WP8 SDK beta with WP7 project, but it should be reproducible in VS2010 and WP7 SDK too, maybe it's problem in WPF, Silverlight and WinRT projects as well.

6 comments
Comment actions Permalink

Hi Martin,

I've forwarded this problem to the corresponding developer; he should take a look at it soon.
Thanks for the report!

0
Comment actions Permalink

Is this bug logged in YouTrack already? I just installed latest EAP v4 and the bug is still there.

0
Comment actions Permalink

Hi Martin,

Sorry for delay.
I've logged the bug here in YouTrack: http://youtrack.jetbrains.com/issue/RSRP-332489.

Thanks for the report once again!

0
Comment actions Permalink

Martin,

The corresponding developer reported, that this issue should be fixed in the recent ReSharper 7.1 EAP builds: http://confluence.jetbrains.com/display/ReSharper/ReSharper+7.1+Nightly+Builds.
Please try it out and let me know how it goes.

Thanks!

0
Comment actions Permalink

Not fixed in the v8 EAP. Typical reproduction, similar to the one I reported in my first post:

I got already
xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
in namespaces.

I then add this to some panel or textblock:
telerikCore:InteractionEffectManager.IsInteractionEnabled="True"

This should be added to namespaces:
xmlns:telerikCore="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Core"

Instead when I use the Alt+Enter auto fix the pasted string changes to
telerikInput:InteractionEffectManager.IsInteractionEnabled="True"
which is wrong and it's still in red, offering auto fix that won't help.

Edit: just tested WP7.1 SDK in VS2010 and v8 EAP - same problem, so it's definitely not a problem with unfinished WP8 SDK for VS2012.

0
Comment actions Permalink

Hi Martin,

Thanks for the information! Great that this bug is now fixed for you!

0

Please sign in to leave a comment.