I’m experiencing a weird error with the visual studio 11 beta WPF designer (i.e. google does not return any results while searching for a part of the stacktrace)
Here is the problem:
When I create a WPF application project, and then add windows or usercontrols to it, I have no problems editing them in the embedded WPF designer.
But when I create a WPF user control project, I cannot manage to get it working: I have the weird error I pasted below.
I’m targeting .Net 4.5 … and my VS is in french (sorry).
I pasted the text for this question to be searcheable, and an image as well, for readability.
EDIT: I would translate the first part of the error message as (sorry for my english…)
Trying to load an assembly from a network source, which has implied using the assembly in sandbox mode in previous version of .Net framework. Since this .Net framework version does not activate CAS strategy by default, this loading might be dangerous.
etc…

System.NotSupportedException Tentative de chargement d’un assembly à
partir d’un emplacement réseau qui aurait entraîné l’utilisation de
l’assembly en mode Bac à sable (sandbox) dans les versions antérieures
du .NET Framework. Cette version du .NET Framework n’activant pas la
stratégie CAS par défaut, ce chargement peut être dangereux. Si ce
chargement n’est pas destiné à utiliser l’assembly en mode Bac à sable
(sandbox), activez le commutateur loadFromRemoteSources. Pour plus
d’informations, consultez
http://go.microsoft.com/fwlink/?LinkId=155569. à
Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.DirectInvoke[T](WaitHandle
abort, Func1 func) à1
Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle
targetObject, Func1 func) à1
Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle
targetObject, Func`2 func) à
Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem
item, IHostTextEditor editor) à
Microsoft.Expression.DesignHost.IsolatedDesignerService.CreateDesignerViewInfo(IIsolationTarget
isolationTarget, IHostSourceItem item, IHostTextEditor editor,
CancellationTokenSource cancelSource)System.NotSupportedException Tentative de chargement d’un assembly à
partir d’un emplacement réseau qui aurait entraîné l’utilisation de
l’assembly en mode Bac à sable (sandbox) dans les versions antérieures
du .NET Framework. Cette version du .NET Framework n’activant pas la
stratégie CAS par défaut, ce chargement peut être dangereux. Si ce
chargement n’est pas destiné à utiliser l’assembly en mode Bac à sable
(sandbox), activez le commutateur loadFromRemoteSources. Pour plus
d’informations, consultez
http://go.microsoft.com/fwlink/?LinkId=155569.Server stack trace: at
Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.WaitForCompletion(BlockingCall
call) at
Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.Invoke(BlockingCall
call) at
Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.Invoke[T](Func11 func) at
func, WaitHandle aborted) at
Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject
targetObject, Func
Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem
remoteItem, IRemoteHostTextEditor remoteEditor) at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
md, Object[] args, Object server, Object[]& outArgs) at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
msg)Exception rethrown at [0]: à
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg) à
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type) à
Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem
remoteItem, IRemoteHostTextEditor remoteEditor) à
Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.b__7(IRemoteDesignerService
d) à
Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass42.<MarshalOut>b__3()1 func)
à
Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.DirectInvoke[T](WaitHandle
abort, FuncSystem.NotSupportedException Tentative de chargement d’un assembly à
partir d’un emplacement réseau qui aurait entraîné l’utilisation de
l’assembly en mode Bac à sable (sandbox) dans les versions antérieures
du .NET Framework. Cette version du .NET Framework n’activant pas la
stratégie CAS par défaut, ce chargement peut être dangereux. Si ce
chargement n’est pas destiné à utiliser l’assembly en mode Bac à sable
(sandbox), activez le commutateur loadFromRemoteSources. Pour plus
d’informations, consultez
http://go.microsoft.com/fwlink/?LinkId=155569. at
System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence
evidence) at System.Reflection.Assembly.LoadFile(String path) at
Microsoft.Expression.Utility.AssemblyHelper.LoadFile(String path)
at
Microsoft.Expression.DesignSurface.Assemblies.AssemblyService.CreateClassicShadowCopy(IHostProject
project, String assemblySourcePath) at
Microsoft.Expression.DesignSurface.Assemblies.AssemblyService.ResolveShadowCopyAssembly(IHostProject
project, String path) at
Microsoft.Expression.DesignSurface.Assemblies.AssemblyService.ResolveAssembly(IHostProject
project, String path) at
Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.GetAssemblyInformation(String
path) at
Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.GetAssemblyInformation(IHostReferenceItem
reference) at
Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.UpdateAssemblyReferences(IEnumerable12.CreateItems(TKey
referencesToUpdate) at
Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver..ctor(IHostProject
project, DesignerContext designerContext) at
Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyService.<.ctor>b__0(IHostProject
project) at
Microsoft.Expression.Utility.Collections.SuspendableKeyedCollection
key) at
System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey2 valueFactory) at
key, Func
Microsoft.Expression.Utility.Collections.SuspendableKeyedCollection2.GetItem(TKey1.b__9()
key) at
Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyService.GetProjectAssemblyResolver(IHostProject
project) at
Microsoft.Expression.DesignSurface.Project.ProjectContextBase.Initialize()
at
Microsoft.Expression.DesignSurface.Project.XamlProjectContext.Initialize()
at
Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject
project, IPlatform platform) at
Microsoft.Expression.DesignSurface.Project.ProjectContextManager.<GetContextsInActiveSolution>d__20.MoveNext()
at
Microsoft.Expression.DesignSurface.Project.XamlProjectContext.get_Application()
at
Microsoft.Expression.DesignSurface.Documents.SceneDocument.GetApplicationDocument(IXamlProjectContext
activeContext) at
Microsoft.Expression.DesignSurface.Documents.SceneDocument.get_ApplicationSceneDocument()
at
Microsoft.Expression.DesignSurface.DocumentViewContext.CreateAndOpenView(ISourceItemContext
sourceItem, Boolean activate, Boolean ensureOpen) at
Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem
item, IHostTextEditor editor) at
Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass9.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__8()
at
Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.<>c__DisplayClassa
at
Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.Call.Invoke()
I appear to have fixed things by setting loadFromSources to enabled as described here:
(Source: http://www.sehajpal.com/index.php/2010/10/how-to-solve-loadfromremotesources-error-in-vs-2010/)
Perhaps it is only really necessary to do this for XDesProc.exe.config, I don’t know.
After that, I got a different error, Method not found: ‘Boolean Microsoft.Windows.Design.PropertyEditing.PropertyFilter.get_IsFiltering()’ :
Fix:
Copy the file Microsoft.Windows.Design.Interaction.dll from c:\Program Files (x86)\Microsoft Expression\Blend for Visual Studio\Microsoft.Windows.Design.Interaction\ to c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies\ (You may wish to make a backup of the existing file first.)
(Source: http://connect.microsoft.com/VisualStudio/feedback/details/728263/xaml-editor-reports-unexpected-error-microsoft-expression-designhost-isolation-remoting-remoteexception)
Someone from Microsoft said installing the Beta over the Developer Preview isn’t supported so maybe that’s why I had this 2nd problem.