Object.GetType выбрасывает NullReferenceExceptions - PullRequest
1 голос
/ 24 января 2012

Я пытаюсь использовать Pex and Moles в своем проекте SharePoint. Однако я столкнулся с проблемой при запуске Pex Explorations. Я получаю сообщение об ошибке:

System.NullReferenceException: Object reference not set to an instance of an object.
  at System.Type System.Object.GetType()

Дополнительно в окне "Результат Pex Exporations" я вижу 2 проблемы с отражением:

System.TypeLoadException: Method 'get_TargetType' in type 'System.ComponentModel.Moles.SBaseNumberConverter' from assembly 'System.Moles, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0ae41878053f6703' does not have an implementation.

на атрибут, который украшает [module System.Moles.dll]

и

System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

на атрибут, который украшает [module System.Moles.dll]

...