mike-ward / VSColorOutput

Color highlighting to Visual Studio's Build and Debug Output Windows
MIT License
429 stars 93 forks source link

VSColorOutput is broken in MSVS2012 #54

Open DmitrySokolov opened 7 years ago

DmitrySokolov commented 7 years ago

MSVS 2012 Update 5 (11.0.61219.00) VSColorOutput 2.5

System.ComponentModel.Composition.CompositionException: The composition produced a single composition error, with 2 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information.

1) The export 'Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationTypeRegistryService (ContractName="Microsoft.VisualStudio.Text.Classification.IClassificationTypeRegistryService")' is not assignable to type 'Microsoft.VisualStudio.Text.Classification.IClassificationTypeRegistryService'.

Resulting in: Cannot set import 'VSColorOutput.Output.ColorClassifier.OutputClassifierProvider.ClassificationRegistry (ContractName="Microsoft.VisualStudio.Text.Classification.IClassificationTypeRegistryService")' on part 'VSColorOutput.Output.ColorClassifier.OutputClassifierProvider'.
Element: VSColorOutput.Output.ColorClassifier.OutputClassifierProvider.ClassificationRegistry (ContractName="Microsoft.VisualStudio.Text.Classification.IClassificationTypeRegistryService") -->  VSColorOutput.Output.ColorClassifier.OutputClassifierProvider

Resulting in: Cannot get export 'VSColorOutput.Output.ColorClassifier.OutputClassifierProvider (ContractName="Microsoft.VisualStudio.Text.Classification.IClassifierProvider")' from part 'VSColorOutput.Output.ColorClassifier.OutputClassifierProvider'.
Element: VSColorOutput.Output.ColorClassifier.OutputClassifierProvider (ContractName="Microsoft.VisualStudio.Text.Classification.IClassifierProvider") -->  VSColorOutput.Output.ColorClassifier.OutputClassifierProvider

2) The export 'Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMapService (ContractName="Microsoft.VisualStudio.Text.Classification.IClassificationFormatMapService")' is not assignable to type 'Microsoft.VisualStudio.Text.Classification.IClassificationFormatMapService'.

Resulting in: Cannot set import 'VSColorOutput.Output.ColorClassifier.OutputClassifierProvider.ClassificationFormatMapService (ContractName="Microsoft.VisualStudio.Text.Classification.IClassificationFormatMapService")' on part 'VSColorOutput.Output.ColorClassifier.OutputClassifierProvider'.
Element: VSColorOutput.Output.ColorClassifier.OutputClassifierProvider.ClassificationFormatMapService (ContractName="Microsoft.VisualStudio.Text.Classification.IClassificationFormatMapService") -->  VSColorOutput.Output.ColorClassifier.OutputClassifierProvider

Resulting in: Cannot get export 'VSColorOutput.Output.ColorClassifier.OutputClassifierProvider (ContractName="Microsoft.VisualStudio.Text.Classification.IClassifierProvider")' from part 'VSColorOutput.Output.ColorClassifier.OutputClassifierProvider'.
Element: VSColorOutput.Output.ColorClassifier.OutputClassifierProvider (ContractName="Microsoft.VisualStudio.Text.Classification.IClassifierProvider") -->  VSColorOutput.Output.ColorClassifier.OutputClassifierProvider

   at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart 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.GetCastedExportedValue[T](Export export)
   at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass11_0`2.<CreateStronglyTypedLazyOfTM>b__1()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource)

System.ComponentModel.Composition.CompositionContractMismatchException: Cannot cast the underlying exported value of type 'VSColorOutput.Output.BuildEvents.BuildEventsProvider (ContractName="Microsoft.VisualStudio.Text.Classification.IClassifierProvider")' to type 'Microsoft.VisualStudio.Text.Classification.IClassifierProvider'.
   at System.ComponentModel.Composition.ExportServices.CastExportedValue[T](ICompositionElement element, Object exportedValue)
   at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
   at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass11_0`2.<CreateStronglyTypedLazyOfTM>b__1()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at System.Lazy`1.get_Value()
   at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource)

V2.4 is OK

MrJLP commented 7 years ago

I'm having the same problem starting today. It started to happen after an update which become available.

Effectively I'm not able to use this anymore which is a bummer since I'm used to using this extension which is very handy.

mike-ward commented 7 years ago

The 2.4 release still works. (See releases)