locked
Visual Studio 2010 Error When Working With WPF/Blend PathListBox RRS feed

  • Question

  • hello Guys,

    I am Currently Working With PathListBox and use it's Behavior "PathListBoxScrollBehavior" now When I open it in Visual Studio 2010 it Gives Error:-

    "Invalid XmlnsDeclaration occurs in assembly 'Expression.Samples.PathListBoxUtils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=76319f7ba805fb35'. XmlnsDeclaration references a namespace 'PathListBoxUtils' that is not in the assembly."

    But it Work Currectly in Expression Blend 4...

    So Guys Plz Give Solution....


    Thank you.
    Tuesday, November 8, 2011 7:05 PM

All replies

  • It looks like that isssue has a ticket over in codeplex marked as Fixed. Do the steps listed in that ticket resolve your issue?

    http://expressionblend.codeplex.com/workitem/8948

    Tuesday, November 8, 2011 8:12 PM
  • it does not give the solution...it doesn't working...
    Thank you.
    Tuesday, November 8, 2011 8:27 PM
  • The topmost comment is as follows:

    oscar_agreda wrote Apr 7 at 2:48 PM
    I fixed it
    
    1-Download the samples from here http://expressionblend.codeplex.com/SourceControl/list/changesets
    2-you will find Expression.Samples.PathListBoxUtils.sln, open it, and build
    3-Go to the folder ....\Expression.Samples.PathListBoxUtils\Expression.Samples.PathListBoxUtils\obj\Silverlight\V4.0\Debug
    4-you will see Expression.Samples.PathListBoxUtils.dll
    5-Rename it to PathListBoxUtils.dll
    6-add that (Renamed) DLL to your Silverlight project..
    7-That is it.. Visual Studio 2010 won't crash anymore when you try to use Intellisense on XAML pages
    
    Regards


    • Proposed as answer by Brian Hilstrom Wednesday, November 9, 2011 3:33 PM
    Tuesday, November 8, 2011 8:31 PM
  • it doesn't work...


    Thank you.
    Thursday, November 10, 2011 12:44 PM
  • I would suggest filing a new issue at the codeplex site for the PathListBoxUtils. It seems like that's the project having an issue, and they are much more likely to know of any namespace issues encountered with their own code.
    Thursday, November 10, 2011 12:51 PM
  • More details please, "it doesn't work..." isn't enough for us to make any useful suggestions. What did you try? What happened when you tried it?
    Thursday, November 10, 2011 4:55 PM
    Moderator
  • it give same error message...

    And My XAML Code is :-

    <Window
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:Expression_Samples_PathListBoxUtils="clr-namespace:Expression.Samples.PathListBoxUtils;assembly=Expression.Samples.PathListBoxUtils"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:ec="http://schemas.microsoft.com/expression/2010/controls"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
     x:Class="MainWindow"
     x:Name="Window"
     Title="MainWindow"
     Width="640" Height="480">
     <Grid x:Name="LayoutRoot">
     <Button x:Name="button" Content="&lt;" HorizontalAlignment="Left" Height="42" Margin="21,0,0,27.969"
    VerticalAlignment="Bottom" Width="110" FontSize="24"/>
     <Button x:Name="button1" Content="&gt;" HorizontalAlignment="Right" Height="42" Margin="0,0,86.952,27.969" VerticalAlignment="Bottom" Width="110" FontSize="24"/>
     <ec:PathListBox x:Name="pathListBox" Margin="-5,116,66,211" WrapItems="True">
     <i:Interaction.Behaviors>
     <Expression_Samples_PathListBoxUtils:PathListBoxScrollBehavior>
     <i:Interaction.Triggers>
     <i:EventTrigger SourceName="pathListBox" EventName="KeyDown" SourceObject="{Binding ElementName=Window}">
     <i:InvokeCommandAction CommandName="DecrementCommand"/>
     </i:EventTrigger>
     <i:EventTrigger SourceName="pathListBox" SourceObject="{Binding ElementName=button1}" EventName="Click">
     <i:InvokeCommandAction CommandName="IncrementCommand"/>
     </i:EventTrigger>
     </i:Interaction.Triggers>
     </Expression_Samples_PathListBoxUtils:PathListBoxScrollBehavior>
     </i:Interaction.Behaviors>
     <ec:PathListBox.LayoutPaths>
     <ec:LayoutPath SourceElement="{Binding ElementName=path}"/>
     </ec:PathListBox.LayoutPaths>
     <Image Source="New Folder1/image01.png" Stretch="Fill" Width="125" Height="125" d:LayoutOverrides="Width, Height, Margin"/>
     <Image Source="New Folder1/image02.png" Stretch="Fill" Width="125" Height="125" d:LayoutOverrides="Width, Height, Margin"/>
     <Image Source="New Folder1/image03.png" Stretch="Fill" Width="125" Height="125" d:LayoutOverrides="Width, Height, Margin"/>
     <Image Source="New Folder1/image04.png" Stretch="Fill" Width="125" Height="125" d:LayoutOverrides="Width, Height, Margin"/>
     <Image Source="New Folder1/image05.png" Stretch="Fill" HorizontalAlignment="Center" VerticalAlignment="Center" Width="125" Height="125"/>
     </ec:PathListBox>
     <Path x:Name="path" Data="M0,226 L553,121" Fill="#00000000" Margin="53,116,8,211" Stretch="Fill" Stroke="Red"
    StrokeThickness="10"/>
     </Grid>
    </Window>


    Thank you.
    Thursday, November 10, 2011 7:26 PM
  • Your XAML is still referencing an assembly called "Expression.Samples.PathListBoxUtils". From reading the codeplex page, I assume (and I could easily be wrong here) that you need to remove the existing Expression.Samples.PathListBoxUtils reference from your project before adding the new one. If that is the case, then your XAML will need to be modified to use the new assembly name so that the xmlns declaration is still valid.

    Does matching up the assembly name in your XAML fix the issue?

    Thursday, November 10, 2011 8:46 PM
  • if i remove Expression.Samples.PathListBoxUtils  and Write PathListBoxUtils then it Give This Error Message :- 

    Error 1:- Unknown build error, ''clr-namespace:Expression.Samples.PathListBoxUtils;assembly = PathListBoxUtils' mapping URI is not valid. Line 6 Position 5.'

    Error 2:- The type 'Expression_Samples_PathListBoxUtils:PathListBoxScrollBehavior' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built

    Error 3:- Assembly 'PathListBoxUtils' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built.


    Thank you.
    Friday, November 11, 2011 6:49 AM
  • Did you add the assembly now called PathListBoxUtils to your project (step 6 a few posts above)? That error message is saying it can't resolve the assembly.
    Monday, November 14, 2011 2:33 PM
  • yes...i add PathListBoxUtils to project...and it show the Error...

    Error 1:- Unknown build error, ''clr-namespace:Expression.Samples.PathListBoxUtils;assembly = PathListBoxUtils' mapping URI is not valid. Line 6 Position 5.'

    Error 2:- The type 'Expression_Samples_PathListBoxUtils:PathListBoxScrollBehavior' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built

    Error 3:- Assembly 'PathListBoxUtils' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built.


    Thank you.
    Monday, November 14, 2011 5:36 PM
  • Could you email me your project? Send it to first.last@microsoft.com (using my name). I'll take a look at it.
    Monday, November 14, 2011 7:24 PM
  • I am anxious to hear y'alls solution.  Will you please post it when you get it figured out?

    I also tried and failed at the proposed fix.

    ~Christine

    Tuesday, November 15, 2011 9:03 PM
  • I followed these instructions. I even started a new project rather than convert an old one and added the newly renamed PathListBoxUtils.dll as a reference.  (I did this for the WPF version btw.)

    I'm still getting errors when switching to VS and can't view the xaml files.

     

    When you look at the dll in the Object Browser it shows that it is still using Expression.Samples.PathListBoxUtils as the namespace.

      Is that what is preventing this from working?  And that "I found a fix" thread hasn't had activity since 2010.  Is it possible in the past year someone came out with a new fix?

    ~Christine

    Saturday, December 3, 2011 2:40 AM
  • Chuck or Brian have you had a chance to look at this?  Is it possible I will be able to fix this or should I just give up?

     

    ~Christine

    Sunday, December 11, 2011 6:49 PM
  • What version of the Blend Samples are you using? It looks like this error should have been fixed by joamason as noted in the link above. Are you using a version from after that fix?
    Monday, December 12, 2011 7:51 PM
    Moderator
  • I downloaded it from that site... http://expressionblend.codeplex.com/SourceControl/changeset/view/55507#1080531

     

    Did I get the wrong one?

     

    ~Christine

    Monday, December 12, 2011 8:15 PM
  • If that changeset is indeed the one you downloaded (55507) it doesn't have Joanna's fix she mentioned in the issue tracker. Her changeset was 61176. It looks like she updated the installer available from the frontpage as well:

    http://expressionblend.codeplex.com/releases/view/57990

    http://expressionblend.codeplex.com/SourceControl/changeset/changes/61176

    • Proposed as answer by Christine L. _ Tuesday, December 13, 2011 3:12 AM
    Monday, December 12, 2011 8:21 PM
    Moderator
  • Well... I'm not so bright.  I just looked and realized the comments are in descending order.

     

    I found this one... http://expressionblend.codeplex.com/SourceControl/changeset/changes/70541 from October.  Or should I do the 61176 that you found?

     

    ~Christine

    Monday, December 12, 2011 8:23 PM
  • I'm not sure what is going on with the refactoring, but they haven't made a release with that stuff yet so it might not be ready. I would stick with either the changeset they used for release or the latest installer from the main page.
    Monday, December 12, 2011 8:25 PM
    Moderator
  • You ARE the BEST!!!    EVER!!!

    Thank you so much!  It works!

    The first time I added the reference to a new project I got the same error code.  So I deleted it and re-added it and it works like a charm!

    I really do appreciate it.

    ~Christine


    Sorry had to come back and say I Love You!  For the first time in 3 months I see my design!  However, I added it to my existing project, got the same error.  So I removed it, rebuilt, added again and it works.  For some reason it kept trying to grab the old dll file which I'm deleting now!

    Have a great Christmas!  My project is finally done!

    Tuesday, December 13, 2011 3:14 AM
  • Dear Chuck and Christine, On using the pathlistbox and pathlistbox utility from the below link

    http://expressionblend.codeplex.com/releases/view/57990

    My solution works perfectly.

    But the APP CRASHES on initializing the page containing the pathlistbox when the aplication launched through installer (msi) file. It is an wpf application. Can you please suggest me on this. I have halfway done on application. Now the installer threatens me ;(

    Thanks, Harl

    • Edited by Harlborn Friday, March 15, 2013 7:49 AM
    Thursday, March 14, 2013 4:49 PM
  • Does the installer include all the needed dll assemblies? You should attach a debugger and find out why it is crashing, that will give you the answer.
    Thursday, March 14, 2013 5:54 PM
    Moderator
  • Yes Chuck,

    I do included all the required dll files. Can u suggest me on using the debugger.

    Thanks,

    Harl

    Friday, March 15, 2013 7:48 AM
  • Hi Chuck,

    It worked. Initially the dlls were added to the application folder, now i moved it to the program files folder. It works now.

    Thanks,

    Harl

    Friday, March 15, 2013 9:21 AM