WithFormatter throws errors - VS 2012

Issue #30 invalid
Jon Turner
created an issue

I'm using the sample formatter code from the project page:

<#= TypeScript.Definitions() .ForLoadedAssemblies() .WithFormatter((type, f) => "I" + ((TypeLite.TsModels.TsClass)type).Name) #>

I'm receiving the following error:

Error 1 Running transformation: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at System.Reflection.RuntimeModule.GetTypes() at System.Reflection.Assembly.GetTypes() at TypeLite.TsModelBuilder.Add(Assembly assembly) in c:___PROJECTS\TypeLITE\TypeLite\TsModelBuilder.cs:line 108 at TypeLite.Net4.TypeScriptFluentExtensions.ForLoadedAssemblies(TypeScriptFluent ts) in c:___PROJECTS\TypeLITE\TypeLite.Net4\TypeScriptFluentExtensions.cs:line 16 at Microsoft.VisualStudio.TextTemplating6FA9BB15AB9784A04FBBCA578EBEE2DAE073B1B9693424A4E39AB71F54A71DC671859E373B4C853ED09AF4DE020C5D8A824FF3E1CD90868FC6E5225AB9165C2E.GeneratedTextTransformation.TransformText() D:\My Projects\eBenefits\eBenefits.WebApi\Scripts\typings\eBenefits\eBenefits.tt 1 1 eBenefits.WebApi

Comments (3)

  1. Isabella Sanfelipo

    I had a similar problem which ended up being an issue with a project being referenced from the main project that had a reference to an older version of MVC than what the main project was using. I used fuslogvw to get the error that was thrown when the assembly failed to load. The Visual Studio error doesn't really give you any useful information to go off of.

  2. Log in to comment