无法在我的项目中找到xmlns:local的程序集引用 [英] Cant find the assembly reference for xmlns:local in my project
问题描述
朋友们,
我正在尝试构建一个应用程序,但最终出现以下错误
Hi friends,
I am trying to build an application, where i was ended up with the following error
必须为不属于项目的XAML文件指定程序集.将XAML文件添加到项目中后,重新打开它,关闭该文件,然后使用与其关联的项目重新打开它,或者修改clr-namespace以包括程序集的名称.
Assembly must be specified for XAML files that are not part of a project. Reopen this XAML file after adding it to a project, close this file and reopen it using the project it is associated with, or modify the clr-namespace to include the name of the assembly.
我的代码段是
My code snippet is
<StackPanel
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ABC.XXX.YYY.Silverlight.Controls"
xmlns:login="clr-namespace:ABC.XXX.YYY.Silverlight.LoginUI"
x:Class="ABC.XXX.YYY.Silverlight.LoginUI.LoginForm"
KeyDown="LoginForm_KeyDown"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=login:LoginInfo}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<local:BusyIndicator x:Name="busyIndicator" BusyContent="{Binding Path=ApplicationStrings.BusyIndicatorLoggingIn, Source={StaticResource ResourceWrapper}}" IsBusy="{Binding IsLoggingIn}">
<StackPanel Orientation="Vertical">
<local:CustomDataForm x:Name="loginForm"
Padding="10,0,10,0"
CurrentItem="{Binding}"
IsEnabled="{Binding IsLoggingIn, Converter={StaticResource NotOperatorValueConverter}}" AutoEdit="True" CommandButtonsVisibility="None" HeaderVisibility="Collapsed" AutoGeneratingField="LoginForm_AutoGeneratingField" Style="{StaticResource LoginDataFormStyle}" /> </StackPanel>
在上面的代码中,
In the above code,
xmlns:local="clr-namespace:ABC.XXX.YYY.Silverlight.Controls"
xmlns:login="clr-namespace:ABC.XXX.YYY.Silverlight.LoginUI"
显示上述错误.
我在错误中搜索了Google,他们要求添加参考.
如果可以的话,我应该在哪里从我的应用程序中获得合适的参考库?
请尽快帮助我.
任何想法将不胜感激.
is showing the above mentioned error.
I googled about the error, they are asking to add a reference.
If I should, where would i get appropriate reference library in my application?
Please help me ASAP.
Any ideas will be greatly appreciated.
推荐答案
如果Silverlight.Controls的代码在另一个自定义程序集中定义,则需要添加一个程序集标记(请参见映射到自定义程序集 [
If the code of the Silverlight.Controls is defined in another custom assembly you need to add an assembly token (see Mapping to custom assemblies[^]). For instance if the namespaces are defined in the AbcXxxYyySilverlight.dll:
xmlns:local="clr-namespace:ABC.XXX.YYY.Silverlight.Controls;assembly=AbcXxxYyySilverlight"
xmlns:login="clr-namespace:ABC.XXX.YYY.Silverlight.LoginUI;assembly=AbcXxxYyySilverlight"
这篇关于无法在我的项目中找到xmlns:local的程序集引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!