特殊文件夹“公共应用程序数据文件夹";在我的安装项目中不可用.为什么? [英] Special Folder "Common Application Data Folder" not available in my setup project. Why?

查看:197
本文介绍了特殊文件夹“公共应用程序数据文件夹";在我的安装项目中不可用.为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个 Visual Studio 2010安装项目,该项目将一些文件部署到我的应用程序可以从中使用它的文件夹中.我希望这样做,以便所有用户都具有相同的文件,并且他们也可以在没有管理员权限的情况下进行操作.

I want to create a Visual Studio 2010 setup project that deploys some files to a folder where my application can use it from. I want it so, that all users have the same files, and that they also could manipulate them without admin rights.

因此,公用应用程序数据文件夹" *为

Thus, "Common Application Data Folder"* as described in this MSDN article, seems fine.

但是,在我的Visual Studio 2010安装项目中,我没有在添加特殊文件夹..."下拉菜单中找到公用应用程序数据文件夹".

However, in my Visual Studio 2010 setup project I did not find the "Common Application Data Folder" available in the "Add special Folder..." drop down menu.

我有一个.NET 4.0 WinForms应用程序,看不出为什么它没有显示. 用户的通用应用程序数据文件夹可用,但与我的预期用途不匹配.

I have a .NET 4.0 WinForms app and see no reason why this does not show up. The user's common application data folder is available but does not match my intended use.

感谢任何提示!

推荐答案

Visual Studio安装项目没有用于通用应用程序数据的预定义文件夹.但是,您可以像这样在其中安装文件:

Visual Studio setup projects do not have a predefined folder for common Application Data. However, you can install files in it like this:

  • 添加一个自定义文件夹并选择它
  • 在其属性"窗格中,将 DefaultLocation 设置为:
  • add a custom folder and select it
  • in its Properties pane set DefaultLocation to:

[CommonAppDataFolder]

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆