0

I have one question about the ValidationContext in an Visual Studio 2013 Isolated Shell project.

I use a compiler on another thread, and would like to add the validation errors to the error toolbox window of the visual studio shell by writing:

context.LogError(errorDescription, cRuleCompilationErrorCode, modelElements);

This call from the other thread doesn't populate the error tool window. I also tried to call the LogError method over the ThreadHelper from MPF, but also nothing happend. (I thought I should call the method on the UI thread)

  ThreadHelper.Generic.Invoke(() => context.LogError(errorDescription, cRuleCompilationErrorCode, modelElements));

I would be very thankfull if someone has an idea how to populate the error tool window from another thread.

Thx Manuel

Maniga
  • 43
  • 1
  • 7
  • Can you explain what `context` is; are you using an `ErrorListProvider` to populate errors? – Matze Apr 03 '14 at 07:35
  • The context is the ValidationContext of an validation method. So there are two (as far as I know, maybe there are more) possibilities to add an error to the error list. 1. Over the ErrorListProvider 2. The validation method gets called by the framework, and the errors can be added to the ValidationContext which is passed to the validation method. – Maniga Apr 03 '14 at 10:42

0 Answers0