VisualStudioまたはMVC4をマシンにインストールせずに、MVCソリューションをテストサーバー上に構築しようとしています。
このソリューションでは、必要なすべてのMVCアセンブリをnugetパッケージと呼びます。プロジェクトでは、すべてのMVCアセンブリがコピーローカルとしてマークされています。もちろん、私の開発マシンでは、ソリューションはVisualStudioで正常に構築されます。
ビルドマシンに.netSDKをインストールし、MSBuildを使用してソリューションをビルドしようとしています。すべてのnugetパッケージはソース管理下にあり、サーバーでSVN更新を実行すると、すべてのパッケージが取得されます。
ビルドを実行すると、MVCDLLへの参照が壊れています。ソリューションではDLLが参照され、ビルドで使用するために存在するため、なぜこれが発生するのかわかりません。
これは、MSBuildによって返されるエラーのサンプルです...
DataAnnotations\RunDataAnnotationsFromModelPropertyAttribute.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?)
DataAnnotations\RunDataAnnotationsFromModelPropertyAttribute.cs(12,93): error CS0246: The type or namespace name 'IClientValidatable' could not be found (are you missing a using directive or an assembly reference?)
Security\MyAuthenticateAttribute.cs(6,18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Security\MyAuthenticateAttribute.cs(12,48): error CS0246: The type or namespace name 'AuthorizeAttribute' could not be found (are you missing a using directive or an assembly reference?)
Security\MyAuthorizeAttribute.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?)
Security\MyAuthorizeAttribute.cs(13,45): error CS0246: The type or namespace name 'AuthorizeAttribute' could not be found (are you missing a using directive or an assembly reference?)
Web\Mvc\MyLoginController.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?)
Web\Mvc\MyLoginController.cs(44,62): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) ...
私はこれに何時間も費やしました。それが私のマシンのビジュアルスタジオでビルドされるが、msbuildを使用するサーバーではビルドされないことは私を苛立たせます。
セス