2012-09-20 14 views
5

Quindi, sto utilizzando Visual Studio 2010 e nell'ultima settimana o ricevo un messaggio da Visual Studio in arrivo: "Visual Studio ha riscontrato un'eccezione. un'estensione."Visual Studio ha riscontrato un'eccezione

mio ActivityLog.xml rivela i registri questo come il 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> 

non sembra esserci alcuna azione specifica che causa questo, a volte capita quando ho fuoco fino VS, a volte dopo la mia partenza la mia scrivania per un po 'e torna indietro. Inoltre, dal log, sembra che avvenga subito dopo aver caricato il pacchetto di editing CSS di Visual Studio. Ho installato MVC4, forse è un problema con il nuovo CSS (penso CSS3?)

In ogni caso, mi chiedevo se qualcuno si fosse imbattuto in questo prima e avesse una sorta di risoluzione.

+0

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

risposta

5

sembra che qualche estensione VS potrebbe causarne il blocco. (hai recentemente installato l'estensione?)

provare a eseguire VS in modalità provvisoria per diagnosticare il problema.

eseguire questo comando e verificare se VS inizia

devenv.exe /safemode 

Maggiori informazioni qui

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

+1

Sì, purtroppo succede ancora in modalità provvisoria, stesso errore – sovemp

+1

potrebbe essere provare a riparare/reinstallare VS installazione .. che potrebbe aiutare .. anche può si può presentare un bug per VS usando gli strumenti qui .. 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ì, immagino che lo farò solo alla fine, non è in crash o qualcosa in questo momento, solo più di un fastidio. – sovemp

4

VS bisogno amministratore previleges per gestire il plugin. Quindi fare clic con il tasto destro su VS e fare clic su "ESEGUI COME AMMINISTRATORE". Ha risolto per me. Prova una volta.

0

Prova questo Strumenti-> Importa ed esporta impostazioni-> Ripristina tutte le impostazioni.

-1

Download web essentials per la versione VS. Ha risolto il problema relativo a ActivityLog.xml. Web Essential

0

ho avuto lo stesso errore e la mia ActivityLog.xml ha mostrato il seguente errore:

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)

risolto andando in Strumenti -> Estensioni e aggiornamenti -> Aggiornamenti -> Visual Studio Gallery -> Installato il nuovo versione di Microsoft ASP.NET and Web Tools

Problemi correlati