3.9.56 に更新するまで、ページは完全にレンダリングされました。ビューは、サービスからの json 応答を使用する Windows フォーム クライアントと共に Windows フォーム アプリケーションでテストされました。これはまだ完全に機能しますが、Razor ビューをテストすると、ページを要求するときに次の例外が発生し続けます。
ERROR: Error occured while Processing Request: [HttpCompileException] c:\Users\Cornel\AppData\Local\Temp\2msjdedu.0.cs(24): error CS0246: The type or namespace name 'ViewPage' could not be found (are you missing a using directive or an assembly reference?), Exception: c:\Users\Cornel\AppData\Local\Temp\2msjdedu.0.cs(24): error CS0246: The type or namespace name 'ViewPage' could not be found (are you missing a using directive or an assembly reference?)
サービスをホストする小さなコンソール アプリケーションを作成し、Razor ビューとページを正しくレンダリングしました。どちらのプロジェクトも、テスト フレームワークでの Windows フォーム アセンブリ参照を除いて、同じ参照を持っています。どちらのプロジェクトも、別のアセンブリ内の同じ管理クラスから AppHost を開始し、すべてのビューが公開されています。
構成ファイルの唯一の違いは<userSettings>
、Windows フォーム テスト フレームワークに関するセクションです。
[編集]
@inherits ViewPage を @inherits ServiceStack.Razor.ViewPage に変更すると、すべてが期待どおりに機能します