views:

25

answers:

1

Hello,

It seems that there is a path lenght limit for VS2008 when loading XAML assemblies.

Using the Microsoft sample Southridge, if the project is stored on "C:\Projects\C# samples\Southridge_Labs\1.Southridge_Fundamentals\Start" the designer does not load the assemblies.

But if I copy my files the project to the root (C:\Southridge_Labs\1.Southridge_Fundamentals\Start) then it works fine.

Basically I have solved my problem, but I want to know if there is an EXPLICIT limit and I cannot find any information related.

Thanks for your help.

+1  A: 

I don't know if there is something different for WPF, but the windows MAX_PATH value is set to 260 characters with some exceptions. But your path does not seem to exceed this limit. Remember though that the path to the assembly includes something like:

.\bin\debug\assembly_name_here.dll

additionly over your project location path.

Maximum Path Length Limitation

In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is "D:\" where "" represents the invisible terminating null character for the current system codepage. (The characters < > are used here for visual clarity and cannot be part of a valid path string.)

Dave White
Thanks for the answer Dave, if you have 5 minutes can you try to reproduce it on your PC? The sample SouthRidge can be found at http://wpf.codeplex.com/releases/view/14962
Jean-Marie
I have forwarded the question to "Microsoft Developer Network > Forums Home > Visual Studio Forums > Visual Studio WPF Designer", I will keep you posted.
Jean-Marie
@Jean-Marie - I've downloaded and rebuilt Southridge on my PC and everything in the starter project seems to work, but I am running Visual Studio 2010 Premium Edition so my attempt to reproduce the problem isn't in the same environment as yourself.
Dave White
Dave, Thank you for trying, I am expecting an answer from MS Forums. If it is unexplained, it's no big deal because I found the fix. It will then belong to the many 01 Science unsolved mysteries...
Jean-Marie