Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a WPF solution from Team Foundation Server which, when I build it, keeps getting the error "The tag <tag name=""> does not exist in XML namespace 'clr-namespace:<namespacename.views>; assembly=<namespacename>.

The tag IS in the file/namespace. It seems that Visual Studio just can't see it.

Everybody else working with the solution does NOT have this problem!! Just me!!!

I have two questions:

1. Could this be a security problem with TFS? Perhaps when I downloaded the solution, I missed something.

2. How can I get Visual Studio (2013) to tell me where it is looking for the reference, and if it is looking in the wrong place, how can I correct it?

What I have tried:

I've tried every other solution on the Internet listed before this one.
Posted
Updated 6-Jun-19 9:17am
v2
Comments
Richard MacCutchan 6-Jun-19 12:27pm    
The error message should tell you which file and what line it is looking at.
Member 12061698 6-Jun-19 12:30pm    
It does, but the reference actually is in that file. How can VS not find an object that is in the file. (I'm sorry that I neglected to mention this in the question. I'll edit it now.)

So you're saying the "error list" says nothing about which "module" is affected? You're just getting some generic message pointing to nowhere? Like "<name>" and "<namespace>" and "" ...

Sounds like a template error. Somewhere.
 
Share this answer
 
Comments
Member 12061698 6-Jun-19 13:54pm    
The error list does point out the module affected. Here's an example:
The tag 'TreeViewSelectedItemBlendBehavior' does not exist in XML namespace 'clr-namespace:FieldReport.Infrastructure.Behaviors;assembly=FieldReport.Infrastructure'. C:\FieldReport\Field Report\Main\Source\FieldReport\Source\FieldReport.Desktop\Views\ApprovalFoldersView.xaml 24 18 FieldReport.Desktop

The problem is that the tag IS in that namespace. The tag 'TreeViewSelectedItemBlendBehavior' IS in XML namespace 'clr-namespace:FieldReport.Infrastructure.Behaviors. Visual Studio just doesn't seem to be able to see it.
[no name] 6-Jun-19 14:12pm    
You should show the XAML. Then insure there are no other errors; because they can cascade nonsense errors. Then you have to see there is an actual reference to that project / dll. THEN use the object browser to confirm the name space. THEN use the name space in code and see what Intelligence does. SOP
OK. Here's the XAML:

<UserControl x:Class="FieldReport.Infrastructure.Views.NotificationView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:viewModels="clr-namespace:FieldReport.Infrastructure.ViewModels"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="150" d:DesignWidth="350">
    <UserControl.DataContext>
        <viewModels:NotificationViewModel />
    </UserControl.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <WrapPanel Grid.Row="0" HorizontalAlignment="Center" Margin="10">
            <Image Name="IconImage" Source="..\Images\StatusAnnotations_Information_32xLG_color.png" Stretch="None" />
            <TextBox IsReadOnly="True" BorderThickness="0" Name="MessageTextBlock" VerticalAlignment="Center" Text="{Binding Notification.Content}" />
        </WrapPanel>
        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" Margin="10">
            <Button Name="OKButton" Margin="5" Height="30" Width="100" IsDefault="True" IsCancel="True" Command="{Binding OKCommand}">OK</Button>
        </StackPanel>
    </Grid>
</UserControl>
 
Share this answer
 
Comments
Richard MacCutchan 7-Jun-19 3:00am    
This is not a solution, please add updates to the original question, as people will now think this has been solved.

Also, provide the complete error message that occurs when trying to build your application.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900