[英]How can I consolidate my dll project settings into my main exe.config file in Visual Studio 2010 for a C# application?
[英]C# .msi Installer Creation without <My Exe Name>.exe.config
當我為C# windows application
創建.msi
文件時,在安裝.msi安裝文件后,文件<myexename>.exe.config
自動出現在安裝路徑中。
如何排除.exe.config文件?
我認為這將在“設置”創建過程本身中完成。
請指教。
<myexename>.exe.config
是您的應用程序的配置文件( App.config
)。 當您為任何Windows應用程序創建安裝程序時,它將自動包含它。
很有必要,例如您在其中存儲了應用程序數據庫連接字符串,或者也可能是其他設置
因此,當您執行應用程序時,您的應用程序myexename
將在<myexename>.exe.config
查找一些設置以及所需的一些必要數據。
另外,如果要排除它,請執行以下步驟:
1)右鍵單擊安裝程序project
-> View
-> File System
2)在“ Application Folder
,右鍵單擊您的應用程序的“主輸出”,然后選擇“ Properties Window
3)在屬性中,選擇Exclude Files
4)點擊Add Filter
5)在文本中輸入app.config
並按OK
現在重建您的項目並安裝.msi
<myexename>.exe.config
將從安裝目錄中刪除
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.