c# - Is it possible to avoid MAX_PATH limit using WiX variables? -
i'm developing project in winforms, , i'm on process of creating installer using wix.
but when installer going copy .dll comes long path, visual studio says this:
'really long route'\enterpriselibrary....\ long, qualified file name must less 260 characters, , directory name must less 248 characters.
i found articles talks max_path limitations said in stackoverflow question related windows api.
i'm working on big team, , discovered known error, not allowed shorten or modify path.
i tried solution link above says, using \\?\ characters before, wixvariables remain this:
<?define examplespath="\\?\$(sys.currentdir)\..\..\examplesfolder" ?> that results this:
\\?\c:\reallylongpath\files
but doesn't seem work wix variables.
so question is:
is there way avoid 260 characters limitation? if so, how?
please, need answer on this!
edit: while try @jans' suggestion, found that, if add \\?\ string wix variable, error message changes. says:
the system cannot find file '\\?\reallylongpath\..\..\andreallylongfile\'
i'm thinking maybe \\?\ not converting ..\ need use... suggestion here?
edit2: found line @ msdn:
a consequence \\?\ turns off file name normalization performed windows apis, including removing trailing spaces, expanding ‘.’ , ‘..’
:___(
this terrible hack, create symlink real directory. symlink regular link, except behaves real directory.
suppose have long directory causes trouble:
c:\blahblahblah\thisisreallylong\andnotaccessible\blahblahblah\ you can create symlink it, has name like, considerably shorter. think of alias. if call on console, example in c:\temp directory:
c:\temp\>mklink /d reallylong c:\blahblahblah\thisisreallylong\andnotaccessible\blahblahblah\ then afterwards, can access c:\temp\reallylong if real directory. note need local admin rights create symlinks.
Comments
Post a Comment