Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

DirectoryNotFoundException: Could not find a part of the path 'D:\ncrunch\workspace\56184\132\...
damianh
#1 Posted : Monday, May 27, 2024 4:09:58 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/5/2014(UTC)
Posts: 21
Location: Netherlands

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
NCrunch V5.7.0.3

I'm getting this error when NCrunch is trying to build one of my test projects:

Quote:

The file 'D:\repos\company\repo\src\MyApp\tests\MyApp.Tests\Path\File.txt' could not be written to the workspace due to error:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\ncrunch\workspace\56184\132\src\MyApp\tests\MyApp.Tests\Path\File.txt'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at nCrunch.Common.IO.FilePath.CopyTo(FilePath destinationPath, Boolean waitForLock)
at nCrunch.Core.ProjectItems.SnapshotComponentMember.WriteToFile(FilePath fileToWriteTo)
at nCrunch.Core.WorkspaceManagement.WorkspaceBuilder.(SnapshotComponentMember )

NCrunch: v8.0.300 of the Dotnet SDK is being used by the NCrunch client, but this server is using v, which is the closest matching version found installed. This may cause issues with the build system. Consider installing v8.0.300 of the Dotnet SDK on this machine.


The test project has some txt files that are copied to the build output directory (with appropriate csproj itemgroup). When I look into "D:\ncrunch\workspace\56184\", the directory "132" is not there. ("131" and other "previous" numbered directories, however, are). I've "anonymised" the path above however it is a long path, in case that might be an issue (I've enabled long paths in the OS).

I've tried the "Additional files to include" but that didn't make any difference. I keep coming back to the fact that "\132" doesn't exist is where the problem is. Note this number changes after I perform "Reload and rebuild selected component", but the result is still the same.

Any ideas how to resolve?

Edit: that last message "but this server is using v, " seems it has bugs.
Remco
#2 Posted : Tuesday, May 28, 2024 12:11:45 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,051

Thanks: 944 times
Was thanked: 1267 time(s) in 1179 post(s)
Hi, thanks for sharing this issue.

I think the first thing we should try is moving your workspace closer to your disk root, in an effort to make sure this isn't a long path issue (recognising that you have long paths enabled, but I've found support for these to be hit-and-miss in various parts of the platform). Setting it to something like 'D:\WS' could be worth doing just to see if it gets rid of the error. If it does, you might be able to find something closer to the root that is a bit more descriptive.

Is this problem showing up on a grid node? If so, does it work for you locally?
damianh
#3 Posted : Thursday, May 30, 2024 8:28:47 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/5/2014(UTC)
Posts: 21
Location: Netherlands

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
I've set the workspace directory to D:\ws as suggested. The path is 244 characters (under the 260 to be consider 'long') and the exact same error still occurs.

I'm not using Grid Node here, just vanilla plugin (VS and Rider)

I'm a loss here...
Remco
#4 Posted : Thursday, May 30, 2024 10:05:45 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,051

Thanks: 944 times
Was thanked: 1267 time(s) in 1179 post(s)
Ok, I'm hopeful we can rule out a path error. Could you submit a bug report after the problem has appeared? Perhaps the log file will shed some light on what's happening here.
damianh
#5 Posted : Friday, May 31, 2024 9:25:23 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/5/2014(UTC)
Posts: 21
Location: Netherlands

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)
Ok will do. I'll try to create a minimal repro. It'll take me a few days.
1 user thanked damianh for this useful post.
Remco on 5/31/2024(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.036 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download