Redoing this question (sorry to anyone who was in the middle of reading it)
Attempting to play with Prism 6, but I'm getting an issue on all of my shellview components, when I'm working in debug mode everything is fine, however the moment I switch to release mode I'm getting a lot of errors.
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
This is happening in pretty much every file. On hovering over the error I get the option to add a reference to Prism, and add using for Prism.MVVM, but there's already a reference there, and after adding the reference back in all I get is a new error stating
The type or namespace name "BindableBase" could not be found, are you missing
a using directive or assembly reference.
Here's one of the files which is going wrong as an example.
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); }
}
}
}
And 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>
Solved my own problem after playing around a bit more.
For some reason (probably during refactoring) my references were messed up in release mode. Went through and uninstalled all the nuget packages I had been using for Prism and Ninject, then reinstalled all the packages, low and behold the problem has been fixed.
Still no idea why it happened in the first place though.