5

Tôi có một máy chủ điều khiển hành trình đang chạy một bản dựng trên máy ảo. Tất cả những gì tôi đã làm là thay đổi điều khiển nguồn từ Perforce thành Git, và quá trình xây dựng hiện không thành công.Kiểm soát hành trình .Net ngoại lệ viết msbuild-results.xml

CCNet Config

<tasks> 
    <msbuild> 
     <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable> 
     <workingDirectory>c:\Build\Pcp_Main</workingDirectory> 
     <buildArgs>/v:d Pcp.proj /target:Clobber;Build /property:Configurations="Debug;Release" /property:NUnitRedirectConsoleOutput=1</buildArgs> 
     <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll</logger> 
     <timeout>2700</timeout> 
    </msbuild> 
</tasks> 

Xây dựng Log

Done Building Project "c:\Build\Pcp_Main\Pcp.proj" (Clobber;Build target(s)). 

Build succeeded. 
    0 Warning(s) 
    0 Error(s) 

Time Elapsed 00:01:32.39 
MSBUILD : error MSB4015: The build stopped unexpectedly because the "ReusableLogger" logger failed unexpectedly during shutdown. 
System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\Build\Pcp_Main\Artifacts\msbuild-results-2d082e8c-0e88-4c0b-9a6b-aa0e3094cab9.xml'. 
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath) 
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 
    at System.Xml.XmlDocument.Save(String filename) 
    at ThoughtWorks.CruiseControl.MSBuild.XmlLogger.Shutdown() 
    at Microsoft.Build.Evaluation.ProjectCollection.ReusableLogger.Shutdown() 
    at Microsoft.Build.BackEnd.Logging.LoggingService.ShutdownLogger(ILogger logger) 
</build> 

Các thư mục c: \ Build \ Pcp_Main \ Artifacts \ tồn tại và người dùng chạy các build có quyền ghi vào thư mục .

Tôi cũng đã thử thay đổi dll ghi nhật ký thành Rodemeyer.MsBuildToCCnet.dll và tôi nhận được cùng một ngoại lệ.

Dự án cũng xây dựng từ dòng lệnh mà không gặp bất kỳ sự cố nào.

Trả lời

6

Sự cố đã có thư mục tạo phẩm bên trong thư mục xây dựng. Di chuyển nó ra ngoài thư mục build đã giải quyết được vấn đề.

+0

đang tìm kiếm tất cả các lưu lượng truy cập trên stackoverflow cho lỗi này nhưng không thể tìm thấy giải pháp. Bây giờ tôi tìm thấy nó bản thân mình và được tìm kiếm cái gì khác ... và tìm thấy điều này ... khi cuộc sống cung cấp cho bạn chanh ..... – spankmaster79

+0

Vui mừng điều này đã giúp một ai đó! – James

+0

Chúng tôi đã nhận được điều này vì vào lúc bắt đầu xây dựng, chúng tôi đã dọn dẹp một bản dựng trước đó, bao gồm tệp nhật ký MSBuild đã được ghi vào. Rất tiếc. –

Các vấn đề liên quan