Skip to content

Instantly share code, notes, and snippets.

@grumpydev
Created March 20, 2013 14:44
Show Gist options
  • Save grumpydev/5205193 to your computer and use it in GitHub Desktop.
Save grumpydev/5205193 to your computer and use it in GitHub Desktop.
Test Failure
System.NotSupportedException
Unable to discover CLR Type for model by the name of Nancy.ViewEngines.Razor.Tests.Models.Person.
Try using a fully qualified type name and ensure that the assembly is added to the configuration file.
AppDomain Assemblies:
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
xunit, Version=1.9.0.1566, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c
Nancy.ViewEngines.Razor.Tests, Version=0.16.1.0, Culture=neutral, PublicKeyToken=null
System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
FakeItEasy, Version=1.7.4109.1, Culture=neutral, PublicKeyToken=eff28e2146d5fd2c
Nancy, Version=0.16.1.0, Culture=neutral, PublicKeyToken=null
System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Nancy.ViewEngines.Razor, Version=0.16.1.0, Culture=neutral, PublicKeyToken=null
System.Web.Razor.Unofficial, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null
System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=a621a9e7e5c32e69
Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
System.Dynamic, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Temp_21a92cc5df2548a4a5ee84bbc7fc51d5, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Temp_abc74b1690de48a79bfaf61a751ac947, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
Current ADATS assemblies:
Nancy.ViewEngines.Razor.Tests, Version=0.16.1.0, Culture=neutral, PublicKeyToken=null
Nancy, Version=0.16.1.0, Culture=neutral, PublicKeyToken=null
Nancy.ViewEngines.Razor, Version=0.16.1.0, Culture=neutral, PublicKeyToken=null
Temp_21a92cc5df2548a4a5ee84bbc7fc51d5, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
Temp_abc74b1690de48a79bfaf61a751ac947, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
Assemblies in directories
T:\NancyMaster\src\Nancy.ViewEngines.Razor.Tests\bin\Debug\FakeItEasy.dll
T:\NancyMaster\src\Nancy.ViewEngines.Razor.Tests\bin\Debug\Nancy.dll
T:\NancyMaster\src\Nancy.ViewEngines.Razor.Tests\bin\Debug\Nancy.ViewEngines.Razor.dll
T:\NancyMaster\src\Nancy.ViewEngines.Razor.Tests\bin\Debug\Nancy.ViewEngines.Razor.Tests.dll
T:\NancyMaster\src\Nancy.ViewEngines.Razor.Tests\bin\Debug\Nancy.ViewEngines.Razor.Tests.Models.dll
T:\NancyMaster\src\Nancy.ViewEngines.Razor.Tests\bin\Debug\System.Web.Razor.Unofficial.dll
T:\NancyMaster\src\Nancy.ViewEngines.Razor.Tests\bin\Debug\xunit.dll
T:\NancyMaster\src\Nancy.ViewEngines.Razor.Tests\bin\Debug\xunit.extensions.dll
at Nancy.ViewEngines.Razor.RazorViewEngine.FindModelType(Block block, Type passedModelType, Type modelCodeGenerator) in RazorViewEngine.cs: line 327
at Nancy.ViewEngines.Razor.RazorViewEngine.GenerateRazorViewFactory(IRazorViewRenderer viewRenderer, GeneratorResults razorResult, Assembly referencingAssembly, Type passedModelType, ViewLocationResult viewLocationResult) in RazorViewEngine.cs: line 147
at Nancy.ViewEngines.Razor.RazorViewEngine.GetCompiledViewFactory(String extension, TextReader reader, Assembly referencingAssembly, Type passedModelType, ViewLocationResult viewLocationResult) in RazorViewEngine.cs: line 137
at Nancy.ViewEngines.Razor.RazorViewEngine.<>c__DisplayClass58.<GetOrCompileView>b__57(ViewLocationResult x) in RazorViewEngine.cs: line 382
at Nancy.ViewEngines.Razor.Tests.RazorViewEngineFixture.<.ctor>b__0(IFakeObjectCall x) in RazorViewEngineFixture.cs: line 38
at FakeItEasy.Configuration.RuleBuilder.ReturnValueConfiguration`1.<>c__DisplayClass8.<ReturnsLazily>b__7(IInterceptedFakeObjectCall x)
at FakeItEasy.Configuration.BuildableCallRule.Apply(IInterceptedFakeObjectCall fakeObjectCall)
at FakeItEasy.Core.FakeManager.Intercept(IWritableFakeObjectCall fakeObjectCall)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.ObjectProxy_1.GetOrAdd<TCompiledView>(ViewLocationResult viewLocationResult, Func`2 valueFactory)
at Nancy.ViewEngines.Razor.RazorViewEngine.GetOrCompileView(ViewLocationResult viewLocationResult, IRenderContext renderContext, Assembly referencingAssembly, Type passedModelType) in RazorViewEngine.cs: line 380
at System.Dynamic.UpdateDelegates.UpdateAndExecute5(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
at CallSite.Target(Closure, CallSite, RazorViewEngine, ViewLocationResult, IRenderContext, Assembly, Object)
at Nancy.ViewEngines.Razor.RazorViewEngine.GetViewInstance(ViewLocationResult viewLocationResult, IRenderContext renderContext, Assembly referencingAssembly, Object model) in RazorViewEngine.cs: line 393
at System.Dynamic.UpdateDelegates.UpdateAndExecute5(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
at CallSite.Target(Closure, CallSite, RazorViewEngine, ViewLocationResult, IRenderContext, Assembly, Object)
at Nancy.ViewEngines.Razor.RazorViewEngine.<>c__DisplayClass1f.<RenderView>b__1e(Stream stream) in RazorViewEngine.cs: line 84
at Nancy.ViewEngines.Razor.Tests.RazorViewEngineFixture.RenderView_csharp_should_be_able_to_find_the_model_when_a_null_model_is_passed() in RazorViewEngineFixture.cs: line 250
@asbjornu
Copy link

I'm having this exception in Nancy right now. What's the problem and how do I go about to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment