0

We have a WPF oneclick application where we have content that is updated from the web server and the files are copied into the application content directories.

It seems that there is a directory that is where content is read from but I can't find it. There seems to be 2 directories that I can find through application variables: AppDomain.CurrentDomain.BaseDirectory System.Deployment.Application.ApplicationDeployment.CurrentDeployment.DataDirectory

The first one gives this directory: %USER_DIR%\AppData\Local\Apps\2.0\Z7CC6XEX.WZ6\AMHN5JKE.24H\gear..tion_58b3e06760c5809e_0001.0000_8bdd947f29008ffc

The second one gives this directory: %USER_DIR%\AppData\Local\Apps\2.0\Data\DCTM6YKT.LZQ\EOCXOVVB.VJC\gear..tion_58b3e06760c5809e_0001.0000_8bdd947f29008ffc\Data

The directory I am interested in is this: %USER_DIR%\AppData\Local\Apps\2.0\Z7CC6XEX.WZ6\AMHN5JKE.24H\gear...exe_58b3e06760c5809e_0001.0000_none_ee6c716212f37acf

I've looked through all the application variables, and can't find a way to get this directory.

Does anyone know how I can get this directory and why it is different?

H.B.
  • 166,899
  • 29
  • 327
  • 400

1 Answers1

0

Not sure what you mean by "get this directory" but on Win 7 this dir is located at C:\Users\User\AppData\Local\Apps\2.0\Data

Howerver, your best option, IMO, is to just create a dir for your app in %APPDATA% folder and store your content there...

Dean Kuga
  • 11,878
  • 8
  • 54
  • 108
  • The problem is that in the xaml content, the image source is as follows: . this location resolves to the location I specified above (which I can't find as an application variable). This is the problem that I am looking to solve. – user1146148 Jan 12 '12 at 19:53
  • @user1146148 This isn't an answer to the question you posted, so I can't post it as an answer, but it may be a solution to your problem. Include the image in your project, and use the 'Resource' Build Action. No need to copy to output. Then reference it with a pack URI like so: `` – YotaXP Jan 13 '12 at 00:24