dotnet / dotnet/crank

System.IO.DirectoryNotFoundException: Could not find a part of the path

Open
#668 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.1k
Forks
111
Avg merge
2d 21h
Merged PRs (30d)
3

Description

Hey folks,

after trying to get things going I finally quit.
I installed the agent and the controller as mentioned in the "getting started"-guide.
Tried the sample and it works like a charm. But after writing my own yml file I can't get rid of this error.

The agent throws following error.
```
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\acker\AppData\Local\Temp\benchmarks-agent\benchmarks-server-27388\ddauafzs.iwi\?Projects.API\global.json'.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable 1 unixCreateMode)
at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.File.WriteToFile(String path, FileMode mode, String contents, Encoding encoding)
at Microsoft.Crank.Agent.Startup.PatchOrCreateGlobalJson(Job job, String benchmarkedApp, String sdkVersion) in /_/src/Microsoft.Crank.Agent/Startup.cs:line 3811
at Microsoft.Crank.Agent.Startup.CloneRestoreAndBuild(String path, Job job, String dotnetHome, CancellationToken cancellationToken) in /_/src/Microsoft.Crank.Agent/Startup.cs:line 2746
at Microsoft.Crank.Agent.Startup.<>c__DisplayClass80_3.<b__22>d.MoveNext() in /_/src/Microsoft.Crank.Agent/Startup.cs:line 896
--- End of stack trace from previous location ---
at Microsoft.Crank.Agent.Startup.ProcessJobs(String hostname, String dockerHostname, CancellationToken cancellationToken) in /_/src/Microsoft.Crank.Agent/Startup.cs:line 1775
```

I tried to create a new global.json file for my project, but this doesn't work.
My project running on .Net 8.0.100

I'm grateful for tips and solutions

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.