WPF: isolated storage file path too long
Posted
by user342961
on Stack Overflow
See other posts from Stack Overflow
or by user342961
Published on 2010-05-17T11:24:48Z
Indexed on
2010/05/17
11:30 UTC
Read the original article
Hit count: 391
Hi,
I'm deploying my WPF app with ClickOnce. When developing locally in Visual Studio, I store files in the isolated storage by calling IsolatedStorageFile.GetUserStoreForDomain()
. This works just fine and the generated path is
C:\Users\Frederik\AppData\Local\IsolatedStorage\phqduaro.crw\hux3pljr.cnx\StrongName.kkulk3wafjkvclxpwvxmpvslqqwckuh0\Publisher.ui0lr4tpq53mz2v2c0uqx21xze0w22gq\Files\FilerefData\-581750116 (189 chars)
But when I deploy my app with ClickOnce, the generated path becomes too long, resulting in a DirectoryNotFoundException
when creating the isolated storage directory. The generated path with ClickOnce is:
C:\Users\Frederik\AppData\Local\Apps\2.0\Data\OQ0LNXJT.R5V\8539ABHC.ODN\exqu..tion_e07264ceafd7486e_0001.0000_b8f01b38216164a0\Data\StrongName.wy0cojdd3mpvq45404l3gxdklugoanvi\Publisher.ui0lr4tpq53mz2v2c0uqx21xze0w22gq\Files\FilerefData\-581750116 (247 chars)
When I browse the folders all but the last directory of the path exists. Then when trying to create a folder at this location windows tells me I can't create a directory because the resulting path name will be too long.
How can I shorten the path generated by the IsolatedStorage?
© Stack Overflow or respective owner