TeamCity에서 .Net MVC 프로젝트 용 빌드를 설정하려고합니다. 여기에 설명 된 단계를 따랐습니다. TeamCity에서 ASPNET 애플리케이션을 빌드하는 방법
그러나 빌드는 여전히 실패하고 있습니다. 내가 가진 오류 메시지는
App_Start\BundleConfig.cs(2, 18): error CS0234: The type or namespace name 'Optimization' does
not exist in the namespace 'System.Web' (are you missing an assembly reference?)
App_Start\FilterConfig.cs(2, 18): error CS0234: The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
App_Start\RouteConfig.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(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, 35): 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?)
Global.asax.cs(6, 18): error CS0234: The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
App_Start\BundleConfig.cs(9, 44): error CS0246: The type or namespace name 'BundleCollection' could not be found (are you missing a using directive or an assembly reference?)
App_Start\FilterConfig.cs(8, 50): error CS0246: The type or namespace name 'GlobalFilterCollection' could not be found (are you missing a using directive or an assembly reference?)
Controllers\HomeController.cs(11, 16): error CS0246: The type or namespace name 'ActionResult' could not be found (are you missing a using directive or an assembly reference?)
Controllers\HomeController.cs(16, 16): error CS0246: The type or namespace name 'ActionResult' could not be found (are you missing a using directive or an assembly reference?)
Controllers\HomeController.cs(23, 16): error CS0246: The type or namespace name 'ActionResult' could not be found (are you missing a using directive or an assembly reference?)
csproj에 Copy Local = true 및 True와 함께 모든 참조가 있습니다. TeamCity가 너겟 패키지를 올바르게 다운로드하고 있지만 사용하지 않는 것 같습니다. 내가 볼 수있는 것은 obj / Release의 .csprojResolveAssemblyReference 파일에 다음 줄이 있다는 것입니다.
C : \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.5.1 \ System.Web.dll
따라서 nuget 폴더의 파일이 아닌 해당 파일을 사용하는 것 같습니다.
빌드를 실행하려면 어떻게해야합니까?
대단히 감사합니다.
마침내 문제를 해결했습니다. 내가 한 일은 NuGet 패키지를 소스 코드 저장소에 업로드하고 TeamCity 구성에서 NuGet 단계를 제거하는 것입니다. 사실, NuGet이 다운 되었음에도 불구하고 내 코드에서 작업 할 수 있도록이 옵션을 선호합니다.
대단히 감사합니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다