fsprojects / FAKE

FAKE - F# Make
https://fake.build
Other
1.28k stars 585 forks source link

Results.xml File access conflict in CCnet #525

Closed mringer closed 8 years ago

mringer commented 10 years ago

I am getting the following stack trace on a plain vanilla CCNet project using both the exec and fake tasks. When I rolled back to version 2.18.2 with no changes in CCNet project everything builds happily. All 3.x.x packages I tried generated similar build result errors when run from CCNet.

Clean)] ]> Copy)] ]> ]]> Clean) C:\CI\ccnet\repos\myproject\myproject\MongoApp already exists. Finished Target: Copy Starting Target: Default (==> Copy) myproject.Setup Installer Build Finished Target: Default --- ## Build Time Report Target Duration --- Clean 00:00:00.0630483 Copy 00:00:00.3930769 Default 00:00:00.0010390 Total: 00:00:00.5676653 ## Status: Ok F# Interactive for F# 3.1 (private) Freely distributed under the Apache 2.0 Open Source License For help type #help;; > [Loading C:\CI\ccnet\repos\myproject\build.fsx] namespace FSI_0001 val srcDir : string val destDir : string val buildDir : string val installerDir : string val releaseDir : string F# Interactive for F# 3.1 (private) Freely distributed under the Apache 2.0 Open Source License For help type #help;; > [Loading C:\CI\ccnet\repos\myproject\build.fsx] namespace FSI_0001 val srcDir : string val destDir : string val buildDir : string val installerDir : string val releaseDir : string FsiEvaluationSession could not be created. Build failed. Error: The process cannot access the file 'C:\CI\ccnet\BuildArtifacts\myproject\fake-results-c755903c-1865-49e8-89b3-b37baca8e7bd.xml' because it is being used by another process. Unhandled Exception: System.IO.IOException: The process cannot access the file 'C:\CI\ccnet\BuildArtifacts\myproject\fake-results-c755903c-1865-49e8-89b3-b37baca8e7bd.xml' because it is being used by another process. 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, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) at Fake.TraceListener.NAntXmlTraceListener.getXmlWriter() in D:\code\fake\src\app\FakeLib\TraceListener.fs:line 70 at Fake.TraceListener.NAntXmlTraceListener.Fake-TraceListener-ITraceListener-Write(TraceData msg) in D:\code\fake\src\app\FakeLib\TraceListener.fs:line 99 at System.Collections.Generic.List`1.ForEach(Action`1 action) at Fake.TraceListener.postMessage(TraceData x) in D:\code\fake\src\app\FakeLib\TraceListener.fs:line 118 at .$Program.main@() in D:\code\fake\src\app\FAKE\Program.fs:line 148 ]]> [Loading C:\CI\ccnet\repos\myproject\build.fsx] namespace FSI_0001 val srcDir : string val destDir : string val buildDir : string val installerDir : string val releaseDir : string ]]> [Loading C:\CI\ccnet\repos\myproject\build.fsx] namespace FSI_0001 val srcDir : string val destDir : string val buildDir : string val installerDir : string val releaseDir : string ]]>
forki commented 10 years ago

Is this an open source project? On Aug 26, 2014 6:54 PM, "Matt R" notifications@github.com wrote:

I am getting the following stack trace on a plain vanilla CCNet project using both the exec and fake tasks. When I rolled back to version 2.18.2 with no changes in CCNet project everything builds happily. All 3.x.x packages I tried generated similar build result errors when run from CCNet.

<![CDATA[Building project with version: 1] ]> <![CDATA[Shortened DependencyGraph for Target Default:] ]> <![CDATA[<== Default] ]> <![CDATA[<== Copy] ]> <![CDATA[<== Clean] ]> <![CDATA[] ]> <![CDATA[The resulting target order is:] ]> <![CDATA[ - Clean] ]> <![CDATA[ - Copy] ]> <![CDATA[ - Default] ]>

<![CDATA[Starting Target: Clean ] ]> <![CDATA[Deleting contents of ./build/] ]> <![CDATA[Deleting contents of myproject/MongoApp] ]> <![CDATA[Deleting contents of ./installer/] ]> <![CDATA[Finished Target: Clean] ]>

<![CDATA[Starting Target: Copy (==> Clean)] ]> <![CDATA[C:\CI\ccnet\repos\myproject\myproject\MongoApp already exists.] ]> <![CDATA[Finished Target: Copy] ]>

<![CDATA[Starting Target: Default (==> Copy)] ]> <![CDATA[myproject.Setup Installer Build] ]> <![CD ATA[Finished Target: Default] ]>

<![CDATA[] ]> <![CDATA[---------------------------------------------------------------------] ]> <![CDATA[Build Time Report] ]> <![CDATA[---------------------------------------------------------------------] ]> <![CDATA[Target Duration] ]> <![CDATA[------ --------] ]> <![CDATA[Clean 00:00:00.0630483] ]> <![CDATA[Copy 00:00:00.3930769] ]> <![CDATA[Default 00:00:00.0010390] ]> <![CDATA[Total: 00:00:00.5676653] ]> <![CDATA[Status: Ok] ]> <![CDATA[---------------------------------------------------------------------] ]> ]]><![CDATA[Building project with version: 1 Shortened DependencyGraph for Target Default: <== Default <== Copy <== Clean

The resulting target order is:

  • Clean
  • Copy
  • Default Starting Target: Clean Deleting contents of ./build/ Deleting contents of myproject/MongoApp Deleting contents of ./installer/ Finished Target: Clean Starting Target: Copy (==> Clean) C:\CI\ccnet\repos\myproject\myproject\MongoApp already exists. Finished Target: Copy Starting Target: Default (==> Copy) myproject.Setup Installer Build Finished Target: Default

Build Time Report

Target Duration

Clean 00:00:00.0630483 Copy 00:00:00.3930769 Default 00:00:00.0010390 Total: 00:00:00.5676653 Status: Ok

F# Interactive for F# 3.1 (private) Freely distributed under the Apache 2.0 Open Source License

For help type #help;;

[Loading C:\CI\ccnet\repos\myproject\build.fsx]

namespace FSI_0001 val srcDir : string val destDir : string val buildDir : string val installerDir : string val releaseDir : string

F# Interactive for F# 3.1 (private) Freely distributed under the Apache 2.0 Open Source License

For help type #help;;

[Loading C:\CI\ccnet\repos\myproject\build.fsx]

namespace FSI_0001 val srcDir : string val destDir : string val buildDir : string val installerDir : string val releaseDir : string

FsiEvaluationSession could not be created. Build failed. Error: The process cannot access the file 'C:\CI\ccnet\BuildArtifacts\myproject\fake-results-c755903c-1865-49e8-89b3-b37baca8e7bd.xml' because it is being used by another process.

Unhandled Exception: System.IO.IOException: The process cannot access the file 'C:\CI\ccnet\BuildArtifacts\myproject\fake-results-c755903c-1865-49e8-89b3-b37baca8e7bd.xml' because it is being used by another process. 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, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) at Fake.TraceListener.NAntXmlTraceListener.getXmlWriter() in D:\code\fake\src\app\FakeLib\TraceListener.fs:line 70 at Fake.TraceListener.NAntXmlTraceListener.Fake-TraceListener-ITraceListener-Write(TraceData msg) in D:\code\fake\src\app\FakeLib\TraceListener.fs:line 99 at System.Collections.Generic.List1.ForEach(Action1 action) at Fake.TraceListener.postMessage(TraceData x) in D:\code\fake\src\app\FakeLib\TraceListener.fs:line 118 at .$Program.main@() in D:\code\fake\src\app\FAKE\Program.fs:line 148 ]]>

<![CDATA[ F# Interactive for F# 3.1 (private) Freely distributed under the Apache 2.0 Open Source License

For help type #help;;

[Loading C:\CI\ccnet\repos\myproject\build.fsx]

namespace FSI_0001 val srcDir : string val destDir : string val buildDir : string val installerDir : string val releaseDir : string

]]> <![CDATA[ F# Interactive for F# 3.1 (private) Freely distributed under the Apache 2.0 Open Source License

For help type #help;;

[Loading C:\CI\ccnet\repos\myproject\build.fsx]

namespace FSI_0001 val srcDir : string val destDir : string val buildDir : string val installerDir : string val releaseDir : string

]]> <![CDATA[FsiEvaluationSession could not be created.]]> <![CDATA[Build failed. Error: The process cannot access the file 'C:\CI\ccnet\BuildArtifacts\myproject\fake-results-c755903c-1865-49e8-89b3-b37baca8e7bd.xml' because it is being used by another process.]]>

— Reply to this email directly or view it on GitHub https://github.com/fsharp/FAKE/issues/525.

mringer commented 10 years ago

Unfortunately it is not, but I think I may be able to reproduce the issue with the FAKE calculator example. I'll add that project to our build server to confirm. Currently we're running CC 1.8.4.0

dsyme commented 8 years ago

Closing as there is no adequate repro