由于System.Web异常,WPF设计器无法加载!

时间:2011-07-30 16:38:32

标签: wpf exception designer system.web

我的wpf设计器无法加载,因为它说它无法找到程序集System.web而且我不知道wpf与System.web有什么关系

Error Shot

任何想法?

以下是XAML页面之一:

<UserControl x:Class="RadinFarazJamAutomationSystem.UserControls.ctrlPriceManagement"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
         mc:Ignorable="d" 
         d:DesignHeight="300" Height="200" Loaded="UserControl_Loaded" Width="300" FlowDirection="RightToLeft" d:DesignWidth="300">
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="1*" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="165*" />
    </Grid.RowDefinitions>
    <Button Content="ثبت" Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="5" Name="btnSave" VerticalAlignment="Center" Width="80" Click="btnSave_Click" Grid.Column="1" />
    <Label Content="نرخ دلار"  HorizontalAlignment="Left" Margin="5" VerticalAlignment="Center" />
    <Label Content="درصد سود مشتری" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="5" VerticalAlignment="Center" />
    <Label Content="درصد سود همکار" Grid.Row="2" Margin="5" VerticalAlignment="Center" />
    <TextBox Grid.Column="1"  HorizontalAlignment="Stretch" Margin="5" Name="txtDollarPrice" VerticalAlignment="Center"  />
    <TextBox Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Name="txtCustomerProfit" VerticalAlignment="Top" />
    <TextBox Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Stretch" Margin="5" Name="txtColleagueProfit" VerticalAlignment="Top" />
</Grid>

但这与xaml无关,因为每个页面都有相同的错误。当有一天我在每个页面看到这个错误时,一切都很好,我不知道我做了什么可能导致这个错误。

1 个答案:

答案 0 :(得分:0)

只是猜测,但是您的项目是否针对.Net Framework的客户端配置文件?如果您尝试使用未包含的类型,那么您可能会看到与此类似的错误。

http://msdn.microsoft.com/en-us/library/cc656912.aspx