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

Notification

Icon
Error

Path too long
MicaL
#1 Posted : Friday, April 19, 2024 7:41:10 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/19/2024(UTC)
Posts: 1

Hi,

I am getting a PathTooLongException and the suggested fixes don't work (partially because the path is a really long path in GAC).
Setting LongPathsEnabled=1 doesn't seem to have an effect (not even after a reboot).

Quote:

NCrunch: If you are experiencing problems in getting this project to build, have a look at https://www.ncrunch.net/...ng_project-build-issues
NCrunch has encountered an internal error: System.Exception: System.IO.PathTooLongException: The path 'C:\windows\assembly\GAC_MSIL\System.Configuration\4.0.0.0__002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293\System.Configuration.dll' could not be processed because it exceeded the maximum allowed length of 259 characters. Try setting your 'Workspace base path' setting closer to the root of your disk, or set the registry entry 'SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled'=1
at nCrunch.Common.IO.DiskPath..ctor(String absolutePath, Boolean pathIsChecked)
at nCrunch.Common.IO.FilePath.FromDirectory(DirectoryPath directory, String fullFileName)
at nCrunch.Compiler.Cil.CilSession.(DirectoryPath , String )
at nCrunch.Compiler.Cil.CilSession.(String , UInt16 , UInt16 , UInt16 , UInt16 , String , String )
at nCrunch.Compiler.Cil.CilSession.(String , String , UInt16 , UInt16 , UInt16 , UInt16 , String , String  )
at nCrunch.Compiler.Cil.CilSession.LoadAssembly(CilAssemblyReference assemblyReference)
at nCrunch.Compiler.Cil.CilSession.GetReferencedModule(CilModule referencingModule, UInt32 assemblyRefTableRowIndex)
at nCrunch.Compiler.Cil.Types.CilExportedTypeTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefinition.ResolveBaseType()
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly.(CilTypeDefinition , RdiTypeHandlingStrategyIndex )
at nCrunch.Compiler.StaticManipulation.BuiltCilAssembly.IdentifyRdiTypeHandlingStrategies()
at nCrunch.Compiler.RuntimeDataInspection.RdiTypeHandlingStrategyIdentificationTask..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.RuntimeDataInspection.RdiTypeHandlingStrategyIdentificationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
at nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
at nCrunch.Core.BuildManagement.BuildEnvironment..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridClientDescription clientDescription, Boolean extractCoverageReportStructure)
Remco
#2 Posted : Friday, April 19, 2024 11:29:17 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,982

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this issue.

There are three situations where you can see this error:
1. When the path is too long, and the registry setting has not been set
2. When the path is too long, and the registry setting is set, but the .NET platform is still kicking up a PathTooLongException when NCrunch tries to process the path
3. When the path is too long, and the NCrunch engine cannot successfully read from the described registry value

Long file paths are somewhat messy when it comes to .NET as a whole. They are getting better, but they only work when every part of the underlying platform supports them. It may be worth checking to see whether there are any other hoops you need to jump through to enable them on your machine (such as a group policy).

With that said, I've found it better to avoid long paths wherever possible. It's not clear to me why this assembly has been installed to such an intolerably long path. A simple option may be to simply copy it out of the GAC and reference it from a different path instead.
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.039 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download