0
重做這個問題(對不起的人誰正在讀它的中間)棱鏡釋放模式導致錯誤
試圖與棱鏡6打球,但我對我所有的shellview組件得到一個問題,當我在調試模式下工作時一切正常,但是當我切換到釋放模式時,我收到了很多錯誤。
Error CS0246 The type or namespace name 'BindableBase' could not be found
(are you missing a using directive or an assembly reference?)
ShellModule C:\Dev\Prism_Prototype\Source\ShellModule\ViewModels\TitleControlViewModel.cs
這幾乎發生在每個文件中。懸停在錯誤上,我可以選擇添加對Prism的引用,並添加使用Prism.MVVM,但那裏已經有一個引用,並且在添加引用後,我得到的是一個新錯誤,指出
下面是作爲例子出錯的一個文件。
using Prism.Mvvm;
using ShellModule.ViewModels.Interfaces;
namespace ShellModule.ViewModels
{
public class TitleControlViewModel : BindableBase, ITitleControlViewModel
{
private string _content = "This is my content";
public string Content
{
get { return _content; }
set { SetProperty(ref _content, value); }
}
}
}
而且TitleControlView.xaml
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mvvm="http://prismlibrary.com/"
mc:Ignorable="d"
mvvm:ViewModelLocator.AutoWireViewModel="true"
x:Class="ShellModule.Views.TitleControlView"
HorizontalContentAlignment="Stretch">
<UserControl.Resources>
</UserControl.Resources>
<Grid x:Name="LayoutRoot">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="100*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label x:Name="DekLogo" Background="{DynamicResource SolidColourASMDefaultRed}" Width="180" Height="60" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.Column="0" Padding="1" >
<Image Source="{DynamicResource DekLogo}" Height="36" Width="110" />
</Label>
<Label x:Name="Notifications" Background="{DynamicResource SolidColourDefaultBackground}" HorizontalContentAlignment="Stretch" Grid.Column="1" Content="{Binding Content}" />
<Label x:Name="SiplaceLogo" Background="{DynamicResource SolidColourBackground}" Width="180" Height="60" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.Column="2" Padding="1">
<Image Source="{DynamicResource Logo}" Height="36" Width="110" />
</Label>
</Grid>
</UserControl>