Loading this assembly would produce a different grant set from other instances
-
6 августа 2012 г. 22:19
Not sure what I did on this one.. to me however, I have never seen this issue before. Today I downloaded .NET 4.5 and installed. The funny thing is that VS2010 didn't show 4.5 under Project Properties. All of my files in this older solution I was needing to change came up a read protected. The cs files would allow me to overwrite them. I went to the main folder and unchecked everything from READ ONLY. Now I see this whenever trying to bring up XAML pages in the editor. I don't know if this is related to the fact I once checked this solution into TFS and attempted to edit my local copy, or something else I've SNAFUd.
Please advise.
System.IO.FileLoadException 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, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(String assemblyString, 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 originalIdentifier, Boolean isGlobal, String identity, FrameworkName frameworkName, AssemblyName appAssemblyName, IVsHierarchy hierarchy) at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProviderWorker(String identifier, IServiceProvider provider) at MS.Internal.Package.VSIsolationProviderService.CreateIsolationProvider(String identifier, IServiceProvider provider) at MS.Internal.Providers.VSDesignerContext.CreateIsolationProvider(IServiceProvider provider, IVsHierarchy hierarchy) at MS.Internal.Providers.VSDesignerContext.<>c__DisplayClass1.<Initialize>b__0(IsolationProviderProxy i) at MS.Internal.Providers.IsolationProviderProxy.get_RealProvider() at MS.Internal.Providers.IsolationProviderProxy.add_UnhandledException(UnhandledExceptionEventHandler value) at MS.Internal.Designer.DesignerPane.LoadDesignerView(Boolean isReload)
JP Cowboy Coders Unite!
Все ответы
-
6 августа 2012 г. 22:42Ok I just proved TFS has nothing to do with this, as I had a stand alone project not stored in TFS. I am seeing the same problem on that Project when trying to load XAML, I can see the mark up but the Designer throws the error above. This must be related to .NET 4.5 as that is the only new thing I introduced to the environment today.
JP Cowboy Coders Unite!
-
6 августа 2012 г. 22:49Newer information, this problem is happening on brand new projects too.
JP Cowboy Coders Unite!
-
7 августа 2012 г. 1:49
Just now reloaded 4.5, noticing that it is taking VS2010 Premium a LONG time to boot up. I mean on the order of 2 minutes to show first screen, of which there's no solution load until another 1 or 2 minutes or so. There appears to be no indication of VS2010 load up failure, just really slow...
I am beginning to think 4.5 RC has done this, but am unsure right now.
I've seen in the past where tool box item loads become problematic, wondering if this is the problem made worse by 4.5?
JP Cowboy Coders Unite!
- Помечено в качестве ответа Mr. Javaman II 7 августа 2012 г. 1:57
-
7 августа 2012 г. 1:56
Ok so the Repair of .NET 4.5 allowed the XAML designer to now show the content. This then was the root cause. Without digging into the original 4.5 load logs I do not know what happened.
However, still do not see 4.5 under project properties, just the Client 4.0 and full 4.0 versions and downward.
NOTE: The 4.5 doc says that if you have to go back to 4.0 you must reload the entire 4.0 package. I may have avoided that with the repair. Still need to investigate how 4.5 integrates because I cannot select it as mentioned above.
NOTE: This was brought on by the Async CTP not being located in one of the assemblies, so I thought ok let's just go for 4.5 because is has the Async support. I don't understand why I lost the ASYNC CTP as I installed it per the instructions about 6 months ago.
JP Cowboy Coders Unite!
-
7 августа 2012 г. 6:28
-
7 августа 2012 г. 12:04
Ziman;
Thanks for that information, it's news to me.
MSFT;
Shame on you for not allowing a free framework to run in your flagship product without ungrade. In essence it means it's not free.
JP Cowboy Coders Unite!

