locked
Can't design anything in WPF (Cider broken) Loading this assembly would produce a different grant set from other instances

    Question

  • My WPF designer is completely broken - I cannot see any UI controls in Cider without getting this exception below.
    It's probably a result of installing SilverLight Beta 2. However I've uninstalled it, everything to do with it, and I've done a repair on Visual Studio 2008. What else can I do to make Cider design again?

    Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
       at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
       at System.Activator.CreateInstance(String assemblyName, String typeName)
       at System.AppDomain.CreateInstance(String assemblyName, String typeName)
       at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
       at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
       at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProvider(String identity, AssemblyReferenceProvider assemblyReferences, IEnumerable`1 assemblyFolders)
       at MS.Internal.Providers.VSDesignerContext.GetIsolationProvider(IServiceProvider provider, IVsHierarchy hierarchy, AssemblyReferenceProvider assemblyReferences, Boolean isSilverlightProject)
       at MS.Internal.Providers.VSDesignerContext.GetIsolationProvider(IServiceProvider provider, IVsHierarchy hierarchy, AssemblyReferenceProvider assemblyReferences)
       at MS.Internal.Providers.VSDesignerContext.Initialize(IServiceProvider provider, IVsHierarchy hierarchy, UInt32 itemid, Object docDataObj)
       at MS.Internal.Providers.VSDesignerContext..ctor(IServiceProvider provider, IVsWindowFrame frame, Object docDataObj)
       at MS.Internal.Providers.VSDesignerContext.GetContext(IServiceProvider services, IVsWindowFrame frame, Boolean createIfNotExist)
       at MS.Internal.Designer.DesignerPane.InitializeDesigner()


    Tuesday, July 29, 2008 3:18 PM

All replies

  • Are you running the SP1 beta?
    - mark(bou), Microsoft. (This post is provided "as-is")
    Wednesday, July 30, 2008 3:28 PM
  • I installed .NET 3.5 SP1 on a test machine and it broke an existing 2.0 application. I tracked the particular error down to a problem that existed in the .NET 2.0 framework with generic lists from the core lib not going across domains (see  http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=95157 ). Besides this problem, I have seen an other person on a forum have a similar problem running a WPF application. If this .NET 2.0 bug has resurfaced in .NET 3.5 SP1, it's a major problem. We have been investing heavily in .NET 3.5 SP1 specific technologies. I verified it's not a problem with .NET 3.5.
    Thursday, August 14, 2008 2:28 PM
  • Try disabling any add-ins (via Tools -> Add-In Manager) and restart VS.

    This worked for me as well as a few others on the net.  We had different add-ins so I cannot say it is tied to a specific one.  For me, I had the ImageMsoVSAddIn that came with the VSTO Power Tools (I believe.)

    Good luck,
    Sal

    • Proposed as answer by saltrin Thursday, August 28, 2008 8:54 PM
    Thursday, August 28, 2008 8:50 PM
  • Disabling the addin worked for me.
    ReSharper and TestDriven.Net were loaded.
    Friday, March 13, 2009 4:30 PM