編譯MVC解決方案老出現這個問題的緣由

Server Error in '/' Application.


The view at '~/Views/Home/Index.cshtml' must derive from WebViewPage, or WebViewPage<TModel>.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: The view at '~/Views/Home/Index.cshtml' must derive from WebViewPage, or WebViewPage<TModel>.

Source Error: 

html

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace: 

web

[InvalidOperationException: The view at '~/Views/Home/Index.cshtml' must derive from WebViewPage, or WebViewPage<TModel>.]

其實就是想搭一個MVC WEBAPI的項目 而後進行過程當中就發現編譯過程當中的一些問題 按照網上的方法也改了仍是出現上面的問題 ide

而後就是比對各個配置 看是否有差別spa

沒想到在最後一個不引人注意的地方 code

我改回成默認的bin目錄 結果就編譯過去了 orm

目前發現設到其餘目錄都不行 不知道具體緣由 暫時記錄一下此狀況。htm

相關文章
相關標籤/搜索