Quantcast
Channel: Fluent Assertions
Viewing all articles
Browse latest Browse all 1402

Edited Issue: System.IO.FileLoadException in AttributeBasedFormatter.AllTypes [12476]

$
0
0
I don't know how to reproduce this in simple project, but I am getting this exception on a test project that uses StackExchange's MiniProfiler


```
Test(s) failed. System.IO.FileLoadException : Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at FluentAssertions.Formatting.AttributeBasedFormatter.GetExportedTypes(Assembly assembly) in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Formatting\AttributeBasedFormatter.cs:line 126
at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at FluentAssertions.Formatting.AttributeBasedFormatter.get_AllTypes() in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Formatting\AttributeBasedFormatter.cs:line 119
at FluentAssertions.Formatting.AttributeBasedFormatter.FindCustomFormatters() in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Formatting\AttributeBasedFormatter.cs:line 63
at FluentAssertions.Formatting.AttributeBasedFormatter.get_Formatters() in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Formatting\AttributeBasedFormatter.cs:line 58
at FluentAssertions.Formatting.AttributeBasedFormatter.GetFormatter(Object value) in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Formatting\AttributeBasedFormatter.cs:line 0
at FluentAssertions.Formatting.AttributeBasedFormatter.CanHandle(Object value) in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Formatting\AttributeBasedFormatter.cs:line 27
at FluentAssertions.Formatting.Formatter.<>c__DisplayClass1.<ToString>b__0(IValueFormatter f) in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Formatting\Formatter.cs:line 54
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
at FluentAssertions.Formatting.Formatter.ToString(Object value, Boolean useLineBreaks, IList`1 processedObjects, Int32 nestedPropertyLevel) in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Formatting\Formatter.cs:line 54
at FluentAssertions.Execution.Verification.<BuildExceptionMessage>b__3(Object a) in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Execution\Verification.cs:line 217
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at FluentAssertions.Execution.Verification.BuildExceptionMessage(String failureMessage, Object[] failureArgs) in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Execution\Verification.cs:line 217
at FluentAssertions.Execution.Verification.FailWith(String failureMessage, Object[] failureArgs) in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Execution\Verification.cs:line 158
at FluentAssertions.Numeric.NumericAssertions`1.Be(T expected, String reason, Object[] reasonArgs) in c:\Workspaces\codeplex\fluentassertions\Main\FluentAssertions.Net35\Numeric\NumericAssertions.cs:line 44
```

IMHO, it would be Ok to handle FileLoadException the same way other exceptions are handled in GetExportedTypes.

Thanks.


Viewing all articles
Browse latest Browse all 1402

Trending Articles