ビルドサーバーで奇妙な問題が発生しています。私はWindows Server 2008 R2上でTeamCityの最新バージョンを使用しています。ビルドサーバーにASP.NET MVCをインストールするためにWebプラットフォームインストーラを使用しましたが、私のコンパイルではまだメッセージが表示されず、System.Web.Mvc.dll
が見つかりませんでした。私はそれが予想される場所でディスク上にあることを確認しました:ASP.NET MVC 3がインストールされているビルドサーバーでASP.NET MVC 3プロジェクトがコンパイルされない
(C:\プログラムファイル(x86の)\マイクロソフトASP.NET \ ASP.NET MVC 3 \アセンブリ)
ここ
は、メッセージの選択である:
Controllers\AccountController.cs(7, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Controllers\AccountController.cs(15, 35): error CS0246: The type or namespace name 'Controller' could not be found (are you missing a using directive or an assembly reference?)
Controllers\HomeController.cs(5, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Controllers\HomeController.cs(9, 32): error CS0246: The type or namespace name 'Controller' could not be found (are you missing a using directive or an assembly reference?)
Global.asax.cs(5, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Models\AccountModels.cs(8, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
だから私は何をしないのですか?
良い質問と答えに私を導きました。 MVC 3がインストールされ、GACにインストールされました。しかし、実際にMVCC 2を見つけることを試みていました。MVCContrib NuGetパッケージをインストールしたので、私はこれが必要と考えています。私がbuildserverにMVC 2をインストールすると、すべて正常に動作しました。 –
ああ、嬉しいことに、メモリから、mvc 3とdllを使用するためにmvc 1と2のすべての要求を設定する必要があるweb.configにバインディング設定があるはずです。 (しかし、私は自分自身でそれを試したことがないので、それがあなたの状況で役に立つかどうかは分かりません) – Skuld