特殊文件夹“公共应用程序数据文件夹";在我的安装项目中不可用.为什么? [英] Special Folder "Common Application Data Folder" not available in my setup project. Why?
问题描述
我想创建一个 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]
- 在此文件夹中,将要安装的文件添加到通用应用程序数据中
在安装期间 CommonAppDataFolder 将由Windows Installer自动解决.
During install CommonAppDataFolder will be automatically resolved by Windows Installer.
这篇关于特殊文件夹“公共应用程序数据文件夹";在我的安装项目中不可用.为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!