Login

russian armor

PathTooLongException - Can't find offending file

5 Jan 2018, 19:18 PM
#1
avatar of Artigo

Posts: 80

Hello friends, wishing you a happy new year hope you're all doing well :)

Now straight to the point:

I've been building on a mod that I play with my friends/family for well over a year and have run into this exception a number of times. My main issue is that I put to mod into my C:\Users\user\Documents\My Games\Company of Heroes 2\mod projects directory so -- when the Intermediate Cache files are created the paths become extremely long.

Until this point, though, I haven't had an issue finding the specific offending files. However, I'm now stuck trying to find the ones that are causing the issue and it's quite a headache. I've deleted/reverted the most recent changes I've made in hopes of that being the cause, but to no avail.

The log files clearly indicate this is the issue:


...
...
AttributeEditorXML.exe Information: 0 : Load complete.
AttributeEditorXML.exe Information: 0 : ----------------------
AttributeEditorXML.exe Information: 0 : Starting validation
AttributeEditorXML.exe Information: 0 : Ending validation
AttributeEditorXML.exe Information: 0 : ----------------------
AttributeEditorXML.exe Error: 0 : Caught an exception in main e = System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.InternalGetDirectoryName(String path)
at AttributeEditorXML.Instance.SaveAsRelicGameDataBinary(String pathName, Boolean preview)
at AttributeEditorXML.AttributeOverlay.SaveBinaries(String filePath)
at AttributeEditorXML.Program.Main(String[] args)


Is there any better way to track this down?

Or is a sort of forced refactoring :lol:

Anyway, help would be much appreciated.

Thank you as always
5 Jan 2018, 20:15 PM
#2
avatar of Mr.Smith

Posts: 2636 | Subs: 17

Move your mo files to c:\mymod . It will allow you to bypass the issue.
5 Jan 2018, 20:18 PM
#3
avatar of Artigo

Posts: 80

Move your mo files to c:\mymod . It will allow you to bypass the issue.


Won't this cause issue with path references?
5 Jan 2018, 20:26 PM
#4
avatar of Mr.Smith

Posts: 2636 | Subs: 17

Nope. All references are relative. As long as you move all fines, you should be ok
5 Jan 2018, 20:32 PM
#5
avatar of Artigo

Posts: 80

Ok I will try this.

Once I move the files do I just open it at the new path inside the mod builder?
5 Jan 2018, 22:49 PM
#6
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Mod Builder does not care where your .mod file is. The shorter the path to your mod folder, the less you will run into this issue.
1 user is browsing this thread: 1 guest

SHOUT IT OUT!

No ProfanityNumber of ShoutsRefresh Shout Box
Osinyagov: Suddenly, coh2 is slowly dying, but you can play it, playerbase still big enough
Last Wednesday, 17:00 PM
Osinyagov: Wow, i remember you from zansi and vali videos, good old memories
Last Wednesday, 16:58 PM
Beinhard: o7 miss this game and zansi
Last Wednesday, 14:09 PM
Lady Xenarra: @Willy Pete The lack of April Fools this year is odd lol
02 Apr 2025, 01:34 AM
Willy Pete: @Rosbone not dead yet. when that happens the font will switch to Papyrus :*(
02 Apr 2025, 00:16 AM
dasheepeh: it was an honor guys :guyokay:
01 Apr 2025, 20:34 PM
aerafield: yeah I already prepared my "Can't believe there's comic mode for the 10 daily visitors even on this April 1st" :guyokay:
01 Apr 2025, 20:29 PM
Rosbone: @dasheepeh I guess that means this site is officially dead :guyokay:
01 Apr 2025, 20:19 PM
dasheepeh: no comic sans font for april 1st this year?
01 Apr 2025, 19:56 PM
Willy Pete: @Lady Xenarra this you? https://i.imgflip.com/3e4thi.jpg
01 Apr 2025, 02:53 AM
Lady Xenarra: Does anyone else think that USF needs buffs? It feels like they’re on life support sometimes
01 Apr 2025, 02:36 AM
Willy Pete: @Rosbone Ahh I missed that memo. I still think its a bad decision though. Adds frustration for players and isnt gonna make them that much money
27 Mar 2025, 15:46 PM
Rosbone: It is also good they left it free until after the free to play weekend. Points for that.
27 Mar 2025, 09:34 AM
Rosbone: But I agree, the cost to get a full decent Coh game pushing $115 US is not the best idea. Especially when it needs so much more work for casuals.
27 Mar 2025, 09:32 AM
Rosbone: To be fair, it was a thank you to early fans right? They said it was not free for long and it would become a pay DLC at some point.
27 Mar 2025, 09:30 AM
Willy Pete: Re-releasing free DLC so they can charge new players money for it. Brilliant marketing strategy :clap:
27 Mar 2025, 04:31 AM
Soheil: Coh2 still broken server ?
25 Mar 2025, 18:27 PM
Rosbone: Congrats to Relic. Looks like Coh3 has finally usurped Coh2 s the popular Coh. You smell terrific. :snfQuinn:.
24 Mar 2025, 02:46 AM

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

256 users are online: 256 guests
0 post in the last 24h
5 posts in the last week
54 posts in the last month
Registered members: 53554
Welcome our newest member, tksv388cam1
Most online: 2043 users on 29 Oct 2023, 01:04 AM