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

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

Open
Philipp-Acker opened this issue Dec 11, 2023 · 1 comment

Comments

@Philipp-Acker
Copy link

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.<<ProcessJobs>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

@sebastienros
Copy link
Member

Can you share the yml file you created. I think there might be typo in your config that creates an invalid path on the agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants