title: Unable to view the WPF designer at design time
body: <p>I’m unable view the designer at designtime after adding GalaSoft.MvvmLight(Runtime version v2.0.50727, version 0.0.0.0) and GalaSoft.MvvmLight.Extras(Runtime v2.0.50727, version 0.0.0.0) dlls. I am getting this exception at design time.</p>
  
  <blockquote>
    <p>System.IO.FileLoadException Could not
    load file or assembly
    'GalaSoft.MvvmLight, Version=0.0.0.0,
    Culture=neutral, PublicKeyToken=null'
    or one of its dependencies. Operation
    is not supported. (Exception from
    HRESULT: 0x80131515) at
    System.Reflection.RuntimeAssembly.<em>nLoad(AssemblyName
    fileName, String codeBase, Evidence
    assemblySecurity, RuntimeAssembly
    locationHint, StackCrawlMark&amp;
    stackMark, Boolean
    throwOnFileNotFound, Boolean
    forIntrospection, Boolean
    suppressSecurityChecks) at
    System.Reflection.RuntimeAssembly.nLoad(AssemblyName
    fileName, String codeBase, Evidence
    assemblySecurity, RuntimeAssembly
    locationHint, StackCrawlMark&amp;
    stackMark, Boolean
    throwOnFileNotFound, Boolean
    forIntrospection, Boolean
    suppressSecurityChecks) at
    System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName
    assemblyRef, Evidence
    assemblySecurity, StackCrawlMark&amp;
    stackMark, Boolean forIntrospection,
    Boolean suppressSecurityChecks) at
    System.Reflection.Assembly.Load(AssemblyName
    assemblyRef) at
    MS.Internal.Package.VSIsolationProviderService.RemoteReferenceProxy.VsReflectionResolver.GetRuntimeAssembly(Assembly
    reflectionAssembly) at
    Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.CachingReflectionResolver.GetRuntimeAssembly(Assembly
    reflectionAssembly) at
    Microsoft.Windows.Design.Metadata.ReflectionMetadataContext.Microsoft.Windows.Design.Metadata.IReflectionResolver.GetRuntimeAssembly(Assembly
    reflectionAssembly) at
    MS.Internal.Metadata.ClrAssembly.GetRuntimeMetadata(Object
    reflectionMetadata) at
    Microsoft.Windows.Design.Metadata.AttributeTableContainer.d</em>_c.MoveNext()
    at
    Microsoft.Windows.Design.Metadata.AttributeTableContainer.GetAttributes(Assembly
    assembly, Type attributeType, Func`2
    reflectionMapper) at
    MS.Internal.Metadata.ClrAssembly.GetAttributes(ITypeMetadata
    attributeType) at
    MS.Internal.Design.Metadata.Xaml.XamlAssembly.get_XmlNamespaceCompatibilityMappings()
    at
    Microsoft.Windows.Design.Metadata.Xaml.XamlExtensionImplementations.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata
    sourceAssembly) at
    Microsoft.Windows.Design.Metadata.Xaml.XamlExtensions.GetXmlNamespaceCompatibilityMappings(IAssemblyMetadata
    source) at
    MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption()
    at
    MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier
    identifier) at
    MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope
    parentScope, IParseContext context) at
    MS.Internal.Design.Markup.XmlElement.ConvertToXaml(XamlElement
    parent, PrefixScope parentScope,
    IParseContext context,
    IMarkupSourceProvider provider) at
    MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.FullParse(Boolean
    convertToXamlWithErrors) at
    MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlSourceDocument.get_RootItem()
    at
    Microsoft.Windows.Design.DocumentModel.Trees.ModifiableDocumentTree.get_ModifiableRootItem()
    at
    Microsoft.Windows.Design.DocumentModel.MarkupDocumentManagerBase.get_LoadState()
    at
    MS.Internal.Host.PersistenceSubsystem.Load()
    at MS.Internal.Host.Designer.Load() at
    MS.Internal.Designer.VSDesigner.Load()
    at
    MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()
    at
    MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView
    view) at
    MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory
    factory, IsolatedView view) at
    MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory
    factory, IsolatedView view) at
    MS.Internal.Host.Isolation.IsolatedDesigner.Load()
    at
    MS.Internal.Designer.DesignerPane.LoadDesignerView()</p>
    
    <p>System.NotSupportedException An
    attempt was made to load an assembly
    from a network location which would
    have caused the assembly to be
    sandboxed in previous versions of the
    .NET Framework. This release of the
    .NET Framework does not enable CAS
    policy by default, so this load may be
    dangerous. If this load is not
    intended to sandbox the assembly,
    please enable the
    loadFromRemoteSources switch. See
    <a href="http://go.microsoft.com/fwlink/?LinkId=155569" rel="nofollow">http://go.microsoft.com/fwlink/?LinkId=155569</a>
    for more information.</p>
  </blockquote>
  
  <p>I am using .Net framework 4.0 ,WPF with c#.</p>
  
  <p>Here my code</p>
  
  <pre><code>&lt;Window x:Class="TreeviewApp.MainWindow" 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
  xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
  xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras" 
  xmlns:dataGrid="http://schemas.microsoft.com/wpf/2008/toolkit" 
  Title="MainWindow" Height="350" Width="525"&gt; 
  &lt;Window.Resources&gt; 
  &lt;DataTemplate x:Key="DetailTemplate"&gt; 
  &lt;TextBlock Text="{Binding Swift_File_Name}"/&gt; 
  &lt;/DataTemplate&gt; 
  &lt;HierarchicalDataTemplate x:Key="MasterTemplate" 
  ItemsSource="{ Binding SwiftCol,Mode=TwoWay}" 
  ItemTemplate="{StaticResource DetailTemplate}"&gt; 
  &lt;HierarchicalDataTemplate.ItemContainerStyle&gt; 
  &lt;Style TargetType="TreeViewItem"&gt; 
  &lt;Setter Property="IsSelected" Value="{Binding IsExpanded,Mode=TwoWay}"/&gt; 
  &lt;/Style&gt; 
  &lt;/HierarchicalDataTemplate.ItemContainerStyle&gt; 
  &lt;TextBlock Text="{Binding CITA_Info_Id}"/&gt; 
  &lt;/HierarchicalDataTemplate&gt; 
  &lt;!--&lt;Style TargetType="TreeViewItem"&gt; 
  &lt;Setter Property="IsExpanded" Value="True" /&gt;
  &lt;/Style&gt;--&gt;
  　
  　
  　
  　
  &lt;!--&lt;Style x:Key="myStyle" TargetType="TreeViewItem"&gt; 
  &lt;Setter Property="IsExpanded" Value="True" /&gt;
  &lt;/Style&gt;--&gt;
  &lt;/Window.Resources&gt; 
  &lt;Grid&gt; 
  &lt;Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="428,0,0,0" Name="button1" Command="{Binding btnClick}" VerticalAlignment="Top" Width="75" /&gt; 
  &lt;TreeView Height="288" HorizontalAlignment="Left" Margin="18,23,0,0" VerticalAlignment="Top" Width="89" 
  x:Name="tvCita" ItemsSource="{Binding CitaCol,Mode=TwoWay}" ItemTemplate="{StaticResource MasterTemplate}"&gt; 
  &lt;TreeView.ItemContainerStyle&gt; 
  &lt;Style TargetType="{x:Type TreeViewItem}"&gt; 
  &lt;Setter Property="IsExpanded" Value="True"/&gt; 
  &lt;/Style&gt; 
  &lt;/TreeView.ItemContainerStyle&gt; 
  &lt;i:Interaction.Triggers&gt; 
  &lt;i:EventTrigger EventName="SelectedItemChanged"&gt; 
  &lt;cmd:EventToCommand Command="{Binding TreeviewItemClick}" CommandParameter="{Binding SelectedItem, ElementName= tvCita, Mode=OneWay}"/&gt; 
  &lt;/i:EventTrigger&gt; 
  &lt;/i:Interaction.Triggers&gt; 
  &lt;/TreeView&gt; 
  &lt;dataGrid:DataGrid Name="dgSwift" Margin="105,24,0,0" ItemsSource="{Binding Path = SwiftCol}" AutoGenerateColumns="False" CanUserAddRows="False"&gt; 
  &lt;dataGrid:DataGrid.Columns&gt; 
  &lt;dataGrid:DataGridTextColumn Header="0000" Binding="{Binding Path = Line_0000_count}"&gt;&lt;/dataGrid:DataGridTextColumn&gt; 
  &lt;dataGrid:DataGridTextColumn Header="1000" Binding="{Binding Path = Line_1000_count}"&gt;&lt;/dataGrid:DataGridTextColumn&gt; 
  &lt;dataGrid:DataGridTextColumn Header="1100" Binding="{Binding Path = Line_1100_Count}"&gt;&lt;/dataGrid:DataGridTextColumn&gt; 
  &lt;dataGrid:DataGridTextColumn Header="1110" Binding="{Binding Path = Line_1110_count}"&gt;&lt;/dataGrid:DataGridTextColumn&gt; 
  &lt;/dataGrid:DataGrid.Columns&gt; 
  &lt;/dataGrid:DataGrid&gt; 
  &lt;/Grid&gt; 
  &lt;/
  Window&gt;
  </code></pre>
  
  <p>But, all the functionality is working fine. Please tell me how to fix this designer issue.</p>