VS 2010 Won't Open Anything

Posted on 2011-10-05
Last Modified: 2012-05-12
Recently, my mac (OS X 10.7) and the VM open in Parallels at the time crashed.  Since then, my VS 2010 Ultimate installation on a 32 bit windows 7 VM seems to be corrupted.  VS 2010 will start fine but as soon as I try to open anything I get this error:

Visual Studio has encountered an exception.  This may be caused by an extension

The error box goes on to recommend running VS 2010 with the /log option, which I did, and found the following long winded error, which occurs about 20 times and seems to cause another 5 errors reported as failures to load packages:

System.BadImageFormatException: Could not load file or assembly 'Microsoft.VisualStudio.Text.UI.Wpf.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'Microsoft.VisualStudio.Text.UI.Wpf.dll' ---> System.BadImageFormatException: Could not load file or assembly 'Microsoft.VisualStudio.Text.UI.Wpf.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. File name: 'Microsoft.VisualStudio.Text.UI.Wpf.dll' Server stack trace: at System.Reflection.AssemblyName.nGetFileInformation(String s) at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile) at System.ComponentModel.Composition.Caching.ReflectionResolver.ResolveAssembly(String assemblyName, String codeBase) at System.ComponentModel.Composition.Caching.AttributedModel.ReflectionCacheServices.ReadAssemblyCore(IDictionary`2 cache) at System.ComponentModel.Composition.Caching.AttributedModel.ReflectionCacheServices.Read[T](IDictionary`2 cache, Func`2 loader, String key, T defaultValue) at System.ComponentModel.Composition.Caching.AttributedModel.ReflectionCacheServices.ReadAssembly(IDictionary`2 cache, String key, Assembly defaultAssembly) at System.ComponentModel.Composition.Hosting.CachedAssemblyCatalog.get_Assembly() at System.ComponentModel.Composition.Hosting.CachedAssemblyCatalog.<.ctor>b__0() at System.ComponentModel.Composition.Caching.AttributedModel.ReflectionCacheServices.<>c__DisplayClass6.<GetLazyTypeForPart>b__5() at System.Lazy`1.CreateValue() Exception rethrown at [0]: at System.Lazy`1.get_Value() at System.ComponentModel.Composition.Caching.AttributedModel.ReflectionCacheServices.<>c__DisplayClass9.<GetAccessorsFromCache>b__8() at System.ComponentModel.Composition.ReflectionModel.LazyMemberInfo.GetAccessors() at System.ComponentModel.Composition.ReflectionModel.ReflectionExtensions.ToReflectionMember(LazyMemberInfo lazyMember) at System.ComponentModel.Composition.ReflectionModel.ReflectionComposablePart.GetExportingMember(ExportDefinition definition) at System.ComponentModel.Composition.ReflectionModel.ReflectionComposablePart.GetExportingMemberFromDefinition(ExportDefinition definition) at System.ComponentModel.Composition.ReflectionModel.ReflectionComposablePart.GetExportedValue(ExportDefinition definition) at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition) at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(ComposablePart part, ExportDefinition export, Boolean isSharedPart) at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore() at System.ComponentModel.Composition.Primitives.Export.get_Value() at System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy[T](Export export) at System.ComponentModel.Composition.ExportServices.<>c__DisplayClassa`1.<CreateStronglyTypedExportOfT>b__7() at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at System.Lazy`1.get_Value() at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension](Object errorSource, Lazy`1 provider)

The package load error (that occurs a couple times,  following the above) is:

SetSite failed for package [Microsoft.VisualStudio.Editor.Implementation.EditorPackage, Microsoft.VisualStudio.Editor.Implementation, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a][

Has anyone seen this before?  Does anyone know how to fix this?  Is this answered somewhere else and I just haven't found it yet?

Nothing will open, not even a new project.  In fact, if I try to create a new project, I get an error box saying "object reference not set to an instance of an object"
Question by:libby9284
    LVL 26

    Expert Comment

    by:Anurag Thakur
    My suggestion will be try to re-install the VS 2010 as it looks like that the installation is corrupted now
    Complete un-install and re-install
    LVL 3

    Expert Comment

    Looks like an extions is the problem

    Go to %LocalAppData%\Microsoft\VisualStudio\10.0\Extensions and copy then to a safe location and the remove them from the folder %LocalAppData%\Microsoft\VisualStudio\10.0\Extensions

    You can also try to make sure that the file Windows\System32\Microsoft.VisualStudio.Text.UI.Wpf.dll exists or perhaps copy it from another development computer.

    hope it helps.
    LVL 11

    Accepted Solution

    I suggest you try to repair before reinstalling.
    LVL 3

    Author Closing Comment

    Thanks!  It's working again now, I'd forgotten about the repair utility and hadn't wanted to do a complete uninstall and reinstall unless absolutely necessary.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now