所以,我使用Visual Studio 2010,並在過去一週我越來越從Visual Studio來了一條消息:「Visual Studio中遇到的異常,這可能由以下原因引起一個延伸。「Visual Studio中遇到異常
我ActivityLog.xml表明將這一情況記錄問題:
<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.

1) Object reference not set to an instance of an object.

Resulting in: An exception occurred while calling the 'OnImportsSatisfied' method on type 'Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword'.

Resulting in: Cannot activate part 'Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword'.
Element: Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword --> Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword

Resulting in: Cannot get export 'Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword (ContractName="Microsoft.VisualStudio.Text.Classification.EditorFormatDefinition")' from part 'Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword'.
Element: Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword (ContractName="Microsoft.VisualStudio.Text.Classification.EditorFormatDefinition") --> Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSKeyword

 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__DisplayClass4`2.<CreateStronglyTypedExportOfTM>b__1()
 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)</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.

1) Object reference not set to an instance of an object.

Resulting in: An exception occurred while calling the 'OnImportsSatisfied' method on type 'Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment'.

Resulting in: Cannot activate part 'Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment'.
Element: Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment --> Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment

Resulting in: Cannot get export 'Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment (ContractName="Microsoft.VisualStudio.Text.Classification.EditorFormatDefinition")' from part 'Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment'.
Element: Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment (ContractName="Microsoft.VisualStudio.Text.Classification.EditorFormatDefinition") --> Microsoft.VisualStudio.Web.Exports.ExportedClassificationFormatCSSComment

 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__DisplayClass4`2.<CreateStronglyTypedExportOfTM>b__1()
 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)</description>
</entry>
似乎沒有是導致此任何具體行動,有時會發生當我第一次火了VS,我離開後,有時我的桌子一會兒回來。另外,從日誌中,它似乎在加載Visual Studio CSS編輯包後立即發生。我安裝了MVC4,也許是與新的CSS問題(CSS3我覺得呢?)
不管怎麼說,只是不知道是否有人已經先運行到這一點,並有某種分辨率。
http://stackoverflow.com/a/20301710/736079 – jessehouwing