开发者

VS2008 WPF Xaml: Is there a path length limit when loading an assembly?

开发者 https://www.devze.com 2023-01-19 23:10 出处:网络
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.S

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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号