question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DotnetRestore target failed during build

See original GitHub issue

Description

I have been trying to build Paket solution using build.cmd that comes with the repo and the build fails at Target DotnetRestore complaining “Cannot start process because a file name has not been provided.”

Repro steps

  1. Clone repo

  2. Run build.cmd from the command line.

Expected behavior

The build script should run successfully.

Actual behavior

I’m getting the following error.

Starting Target: DotnetRestore (==> Build) restore C:\Users\nelson.lin\Source\Github\Paket\src\Paket.Core\Paket.Core\project.json Running build failed. Error: System.Exception: Start of process failed. Cannot start process because a file name has not been provided. at Fake.ProcessHelper.ExecProcessWithLambdas@79-16.Invoke(String message) in C:\code\FAKE\src\app\FakeLib\ProcessHelper.fs:line 79 at Fake.ProcessHelper.ExecProcessWithLambdas(FSharpFunc2 configProcessStartInfoF, TimeSpan timeOut, Boolean silent, FSharpFunc2 errorF, FSharpFunc2 messageF) in C:\code\FAKE\src\app\FakeLib\ProcessHelper.fs:line 79 at FSI_0005.Fake.DotNet.Cli.Dotnet(DotnetOptions options, String args) at FSI_0005.Fake.DotNet.Cli.DotnetRestore(FSharpFunc2 setParams, String project) at FSI_0005.Build.clo@151-9.Invoke(String proj) at Microsoft.FSharp.Collections.SeqModule.Iterate[T](FSharpFunc2 action, IEnumerable1 source) at FSI_0005.Build.clo@148-8.Invoke(Unit _arg1) at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\FAKE\src\app\FakeLib\TargetHelper.fs:line 492

Known workarounds

n/a

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:34 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
forkicommented, Nov 1, 2016

Question is if it’s even possible to have net 45 + coreclr build in same fsproj

Am 01.11.2016 11:57 vorm. schrieb “Steffen Forkmann” sforkmann@gmail.com:

Yeah I guess that’s one for tomorrow

Am 01.11.2016 11:28 vorm. schrieb “Tomasz Heimowski” < notifications@github.com>:

Starting Target: DotnetRestore (==> InstallDotNetCore) dotnetcore/dotnet.exe restore c:\github\Paket\src\Paket.Core\Paket.Core\project.json MSBUILD : error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1. [c:\github\Paket\src\Paket.Core\Paket.Core\project.json]

Looks like the latest restore doesn’t expect JSON format anymore 😃

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Paket/issues/1995#issuecomment-257533781, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNLRtnXy-f6bJla4eTlNleKxu99xPks5q5xQ6gaJpZM4KlwR8 .

0reactions
enricosadacommented, Jan 24, 2018

Closing, now should work

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet build command fails while restoring packages
I have a project that's building fine locally but the build in VSTS it fails in dotnet build command. The error looks very...
Read more >
dotnet restore fails in Arm-based container on an x64 host ...
When try to build arm64 containers using .Net7 results in a error on restore step. Just create a new web api for example...
Read more >
dotnet restore fails in build on private agent and TFS
For testing I added a command line task to run dotnet restore directly and it works fine. "C:\Program Files\dotnet\dotnet.exe" restore %BUILD_SOURCESDIRECTORY%\ ...
Read more >
dotnet restore command - .NET CLI
Learn how to restore dependencies and project-specific tools with the dotnet restore command.
Read more >
dotnet build command - .NET CLI
The dotnet build command builds a project and all of its dependencies. ... The dotnet restore command is still useful in certain scenarios ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found