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>