Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fake fails when running dotnet outside the project #2046

Closed
JohBa opened this issue Jul 31, 2018 · 0 comments
Closed

Fake fails when running dotnet outside the project #2046

JohBa opened this issue Jul 31, 2018 · 0 comments

Comments

@JohBa
Copy link

JohBa commented Jul 31, 2018

Script reported an error:
-> BuildFailedException: Target 'Test' failed.
   StackTrace:
        at Fake.Core.TargetModule.runInternal(Boolean singleTarget, Int32 parallelJobs, String targetName, FSharpList`1 args) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 723
        at Fake.Core.TargetModule.runWithDefault$cont@795-1(Boolean allowArgs, FSharpFunc`2 fDefault, FSharpMap`2 results, Unit unitVar) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 827
        at <StartupCode$build_C5CD0E80EA481DD36D48431ECA1F02EC64BE699CF8CCFF02C55C930DD4A171D1>.$Build$fsx.main@() in C:\Repos\SomeCompany.Product\build.fsx:line 160
-> One or more errors occurred. (Could not find a part of the path 'C:\source\Services.CoreApp\Services.CoreApp.Service.MvcTests\global.json'.)
-> DirectoryNotFoundException: Could not find a part of the path 'C:\source\Services.CoreApp\Services.CoreApp.Service.MvcTests\global.json'.
   StackTrace:
        at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
        at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
        at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
        at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
        at System.IO.StreamWriter..ctor(String path)
        at System.IO.File.WriteAllText(String path, String contents)
        at Fake.DotNet.DotNet.withGlobalJson[a](String workDir, FSharpOption`1 version, FSharpFunc`2 f) in D:\a\1\s\src\app\Fake.DotNet.Cli\DotNet.fs:line 543
        at Fake.DotNet.DotNet.exec(FSharpFunc`2 buildOptions, String command, String args) in D:\a\1\s\src\app\Fake.DotNet.Cli\DotNet.fs:line 587
        at Build.runDotNet(String cmd, String workingDir) in C:\Repos\SomeCompany.Product\build.fsx:line 62
        at Build.clo@99-5.Invoke(TargetParameter _arg5) in C:\Repos\SomeCompany.Product\build.fsx:line 100
        at Fake.Core.TargetModule.runSimpleInternal(TargetContext context, Target target) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 195
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants