2017-07-08 13 views
0

私はTypelite 1.8.4を使用して、c#クラスからTypescriptクラスを生成しています。Typeliteエラー:実行中の変換:System.Reflection.ReflectionTypeLoadException:要求されたタイプの1つ以上を読み込めません。

私はVisual Studio 2017を起動し、TypeLite.Net4.ttで "Run Custom Tool"を実行すると完全に動作し、Typescriptクラスを生成しています。しかし、私は再びそれをしようとすると、それがこのエラーで失敗します。

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:\Users\Lukas\Source\Repos\TypeLITEv1\TypeLite\TsModelBuilder.cs:line 134 at TypeLite.Net4.TypeScriptFluentExtensions.ForLoadedAssemblies(TypeScriptFluent ts) in C:\Users\Lukas\Source\Repos\TypeLITEv1\TypeLite.Net4\TypeScriptFluentExtensions.cs:line 15

at Microsoft.VisualStudio.TextTemplating9A6A0626656F4B1B1A666FE3F7627C9E3D094486020135F96EA52B0B12A8F2A3ADF349B4229C4882A5008416F0CCFFB9B9AB22544159413BEC922E10DC8E87A3.GeneratedTextTransformation.TransformText() MyAppName C:\VSTS\MySolutionName\MyProjectName\Scripts\TypeLite.Net4.tt 1

のVisual Studioを閉じて、再びそれを再開した後、「ファイル名を指定して実行カスタムツール」を再び正常に動作して活字体クラスを生成しています。しかし、Visual Studioを再起動してTypeLite.Net4.d.tsが空になるたびに毎回失敗します。

Typelite世代のクラスをエラーなく再現するにはどうしたらいいですか?

+0

私は同じ問題があります。 VSを再起動する必要はありません。ソリューションを閉じてもう一度開くだけで、もう一度ビルドすることができます。 – ejmarino

答えて

0

私はこれを引き起こしているのか分かりませんが、VS /ソリューションを閉じたくない場合は、clean solutionとそれ以降はrebuildとなり、もう一度動作します。

関連する問題