fsprojects / FAKE

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

Fake script fails with Error: `The specified file name or path is too long` #2707

Open ghost opened 1 year ago

ghost commented 1 year ago

Description

While trying to run a task with fake, I get an error message saying Script is not valid: unknown (1,0)-(1,0): Error FS0193: The specified file name or path is too long, or a component of the specified path is too long. That happens for SwaggerProvider on a master branch.

Repro steps

  1. Clone SwaggerProvider
  2. Run dotnet tool restore
  3. Run dotnet fake run build.fsx

Expected behavior

Fake starts building the project.

Actual behavior

Fake scripts fails with an error Script is not valid: unknown (1,0)-(1,0): Error FS0193: The specified file name or path is too long, or a component of the specified path is too long.`

>==> dotnet tool restore
Tool 'paket' (version '7.1.5') was restored. Available commands: paket
Tool 'fake-cli' (version '5.23.0') was restored. Available commands: fake
Tool 'dotnet-serve' (version '1.10.140') was restored. Available commands: dotnet-serve
Tool 'fantomas' (version '5.0.3') was restored. Available commands: fantomas

Restore was successful.
>==> dotnet --version
6.0.401
>==> dotnet fake run
The last restore is still up to date. Nothing left to do.
Script is not valid:
    unknown (1,0)-(1,0): Error FS0193: The specified file name or path is too long, or a component of the specified path is too long.
Performance:
 - Cli parsing: 101 milliseconds
 - Packages: 39 milliseconds
 - Script compiling: 308 milliseconds
 - Runtime: 648 milliseconds

Known workarounds

Not found

Related information

github-actions[bot] commented 1 year ago

Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project!

ghost commented 1 year ago

May be a duplicate of #2626