2012-09-20 11 views
5

Por lo tanto, estoy usando Visual Studio 2010, y en la última semana o estoy recibiendo un mensaje de Visual Studio que se avecina: "Visual Studio ha encontrado una excepción. Esto puede ser causado por Una extensión."Visual Studio ha encontrado una excepción

Mi ActivityLog.xml revela los registros de esto como el problema:

<entry> 
    <record>321</record> 
    <time>2012/09/20 16:52:36.126</time> 
    <type>Error</type> 
    <source>Editor or Editor Extension</source> 
    <description>System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. 
Review the CompositionException.Errors property for more detailed information.&#x000D;&#x000A;&#x000D;&#x000A;1) Object reference not set to an instance of an object.&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: An exception occurred while calling the &apos;OnImportsSatisfied&apos; method on type &apos;Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword&apos;.&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot activate part &apos;Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword --&gt; Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot get export &apos;Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword (ContractName=&quot;Microsoft.VisualStudio.Text.Classification.EditorFormatDefinition&quot;)&apos; from part &apos;Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword (ContractName=&quot;Microsoft.VisualStudio.Text.Classification.EditorFormatDefinition&quot;) --&gt; Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword&#x000D;&#x000A;&#x000D;&#x000A; at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)&#x000D;&#x000A; at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(ComposablePart part, ExportDefinition export, Boolean isSharedPart)&#x000D;&#x000A; at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()&#x000D;&#x000A; at System.ComponentModel.Composition.Primitives.Export.get_Value()&#x000D;&#x000A; at System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy[T](Export export)&#x000D;&#x000A; at System.ComponentModel.Composition.ExportServices.&lt;&gt;c__DisplayClass4`2.&lt;CreateStronglyTypedExportOfTM&gt;b__1()&#x000D;&#x000A; at System.Lazy`1.CreateValue()&#x000D;&#x000A; at System.Lazy`1.LazyInitValue()&#x000D;&#x000A; at System.Lazy`1.get_Value()&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension](Object errorSource, Lazy`1 provider)</description> 
</entry> 

<entry> 
    <record>322</record> 
    <time>2012/09/20 16:52:36.202</time> 
    <type>Error</type> 
    <source>Editor or Editor Extension</source> 
    <description>System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.&#x000D;&#x000A;&#x000D;&#x000A;1) Object reference not set to an instance of an object.&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: An exception occurred while calling the &apos;OnImportsSatisfied&apos; method on type &apos;Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment&apos;.&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot activate part &apos;Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment --&gt; Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment&#x000D;&#x000A;&#x000D;&#x000A;Resulting in: Cannot get export &apos;Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment (ContractName=&quot;Microsoft.VisualStudio.Text.Classification.EditorFormatDefinition&quot;)&apos; from part &apos;Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment&apos;.&#x000D;&#x000A;Element: Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment (ContractName=&quot;Microsoft.VisualStudio.Text.Classification.EditorFormatDefinition&quot;) --&gt; Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment&#x000D;&#x000A;&#x000D;&#x000A; at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)&#x000D;&#x000A; at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(ComposablePart part, ExportDefinition export, Boolean isSharedPart)&#x000D;&#x000A; at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()&#x000D;&#x000A; at System.ComponentModel.Composition.Primitives.Export.get_Value()&#x000D;&#x000A; at System.ComponentModel.Composition.ExportServices.GetExportedValueFromLazy[T](Export export)&#x000D;&#x000A; at System.ComponentModel.Composition.ExportServices.&lt;&gt;c__DisplayClass4`2.&lt;CreateStronglyTypedExportOfTM&gt;b__1()&#x000D;&#x000A; at System.Lazy`1.CreateValue()&#x000D;&#x000A; at System.Lazy`1.LazyInitValue()&#x000D;&#x000A; at System.Lazy`1.get_Value()&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension](Object errorSource, Lazy`1 provider)</description> 
</entry> 

no parece haber ninguna acción específica que causa esto, a veces sucede cuando por primera vez el fuego de VS, a veces después de que deje mi escritorio por un tiempo y vuelve. Además, a partir del registro, parece suceder justo después de cargar el paquete de edición de Visual Studio CSS. Tengo MVC4 instalado, tal vez es un problema con el nuevo CSS (¿creo que CSS3?)

De todos modos, me preguntaba si alguien se había topado con esto antes y tenía algún tipo de resolución.

+0

http://stackoverflow.com/a/20301710/736079 – jessehouwing

Respuesta

5

parece que algunas extensiones VS pueden estar bloqueando. (¿instaló la extensión recientemente?)

intente ejecutar VS en modo seguro para diagnosticar el problema.

Ejecutar este comando y comprobar si VS comienza

devenv.exe /safemode 

Más aquí

http://blog.meidianto.com/2010/05/16/vs2010-tips-8-got-annoying-visual-studio-2010-error-try-to-run-in-safe-mode/

+1

Sí, por desgracia, todavía sucede en el modo seguro, el mismo error – sovemp

+1

puede ser intentar reparar/reinstalar VS instalación .. eso podría ayudar .. también puede ya que puedes presentar un error para VS usando herramientas aquí .. http://blogs.msdn.com/b/visualstudio/archive/2012/06/20/the-visual-studio-2012-feedback-tool-a-better-way-to-submit-bugs.aspx – Amitd

+1

Sí, imagino que haré eso eventualmente, no se está cayendo ni nada en este momento, simplemente es más una molestia. – sovemp

4

VS necesita administrador previleges para manejar el plugin. Así que haga clic derecho en VS y haga clic en "EJECUTAR COMO ADMINISTRADOR". Lo resolvió para mí. Trata una vez.

0

Pruebe esto Herramientas-> Importar y exportar configuraciones-> Restablecer todas las configuraciones.

-1

Descargue los elementos esenciales de la web para su versión VS. Ordene mi problema con respecto a ActivityLog.xml. Web Essential

0

que tenían el mismo error y mi ActivityLog.xml mostraron el siguiente error:

System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information. 1) No exports were found that match the constraint: ContractName Microsoft.VisualStudio.Web.Editor.Package.Lint.WebLinter.IWebLinterAggregator RequiredTypeIdentity Microsoft.VisualStudio.Web.Editor.Package.Lint.WebLinter.IWebLinterAggregator Resulting in: Cannot set import 'Microsoft.Web.Editor.Composition.ComponentLocator(Microsoft.VisualStudio.Web.Editor.Package.Lint.WebLinter.IWebLinterAggregator)+SingleImporter.Import (ContractName="Microsoft.VisualStudio.Web.Editor.Package.Lint.WebLinter.IWebLinterAggregator")' on part 'Microsoft.Web.Editor.Composition.ComponentLocator(Microsoft.VisualStudio.Web.Editor.Package.Lint.WebLinter.IWebLinterAggregator)+SingleImporter'. Element: Microsoft.Web.Editor.Composition.ComponentLocator(Microsoft.VisualStudio.Web.Editor.Package.Lint.WebLinter.IWebLinterAggregator)+SingleImporter.Import (ContractName="Microsoft.VisualStudio.Web.Editor.Package.Lint.WebLinter.IWebLinterAggregator") --> Microsoft.Web.Editor.Composition.ComponentLocator(Microsoft.VisualStudio.Web.Editor.Package.Lint.WebLinter.IWebLinterAggregator)+SingleImporter at System.ComponentModel.Composition.CompositionResult.ThrowOnErrors(AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImportsOnce(ComposablePart part) at System.ComponentModel.Composition.Hosting.CompositionContainer.SatisfyImportsOnce(ComposablePart part) at Microsoft.VisualStudio.Composition.NetFxAdapters.CompositionService.SatisfyImportsOnce(ComposablePart part) at System.ComponentModel.Composition.AttributedModelServices.SatisfyImportsOnce(ICompositionService compositionService, Object attributedPart) at Microsoft.Web.Editor.Composition.ComponentLocator`1.Import() at Microsoft.VisualStudio.Web.Editor.Package.Lint.WebLinter.LinterUtilities.<>c.<.cctor>b__4_1() at System.Lazy`1.CreateValue() at System.Lazy`1.LazyInitValue() at System.Lazy`1.get_Value() at Microsoft.VisualStudio.Web.Editor.Package.Lint.WebLinter.LinterUtilities.IsFileSupported(String fileName) at Microsoft.VisualStudio.Web.Editor.Package.Lint.ErrorTagger.LintErrorTaggerProvider.CreateTagger[T](ITextBuffer textBuffer) at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)

lo resolvió por ir a Herramientas -> Extensiones y Actualizaciones -> Actualizaciones -> Visual Studio Gallery -> Instalado el nuevo versión de Microsoft ASP.NET and Web Tools

Cuestiones relacionadas