Subscribe to How-To Geek सदस्यता के लिए कैसे करने के लिए geek -

Important! This is an automatic machine translated page. If you can read english, you should Click Here to read the original English version of the article.

How to Add a Configuration File to your Windows Forms application कैसे अपनी विण्डोज़ को आवेदन फार्मों के लिए एक विन्यास फाइल जोड़ें

When you are creating a new Windows Forms application, it isn't immediately obvious how to get a configuration file for your application. जब आप एक नया Windows Forms अनुप्रयोग पैदा कर रहे हैं, यह स्पष्ट नहीं है तुरंत कैसे आपके आवेदन के लिए एक विन्यास फाइल को पाने के लिए. Your application configuration file is supposed to be called executablename.exe.config, and should be in the same directory as your application in order for the .NET framework to automatically use it. आपके आवेदन की विन्यास फाइल को executablename.exe.config नाम होना चाहिए, और है. NET Framework के लिए आदेश में अपने आवेदन के रूप में एक ही निर्देशिका में स्वचालित रूप से इसे इस्तेमाल करना चाहिए.

But when you create the configuration file in the \bin\debug directory, it gets overwritten immediately when you do a new build. लेकिन जब तुम बिन \ में विन्यास फाइल \ डिबग निर्देशिका बनाने के लिए, यह तत्काल अधिलेखित हो जाता है जब आप एक नया निर्माण करना. That's slightly annoying. वह थोड़ा परेशान है.

The proper way to add this file is to add new new configuration file called App.config to your project, which Visual Studio will automatically copy and rename to the same name as your executable's name when you do a build. सही तरीका इस फाइल जोड़ने के लिए नए नए विन्यास अपनी परियोजना है, जो दृश्य स्टूडियो स्वचालित रूप से कॉपी करें और अपने निष्पादन योग्य जब आप एक बनाने के नाम के रूप में एक ही नाम का नाम बदलना होगा App.config को बुलाया फ़ाइल जोड़ें है.

There's a really simple way to do this.. वहाँ एक बहुत आसान तरीका यह करना है .. simply go to the File \ Add New Item menu, or hit Ctrl+Shift+A बस फाइल जाना \ नई मेनू आइटम, या हिट Ctrl + Shift जोड़ें A +

You'll notice that it's already set to App.config for you. तुम नोटिस हूँ कि यह पहले से ही आप के लिए App.config के लिए निर्धारित है. Just hit the Open button. बस खोलें बटन मारा.

If you look in the Solution Explorer, you will see that the config file is in your project: अगर आप समाधान एक्सप्लोरर में देखो, आप देखेंगे कि आपके परियोजना config फाइल में है:


Now build your application, and take a look in the \bin\debug\ folder. अब आपके आवेदन का निर्माण, और बिन \ में देखने \ डिबग \ फ़ोल्डर. You'll see that the configuration file has automatically been generated and named correctly for your executable: आप देखेंगे कि विन्यास फाइल स्वतः जनित है और अपने निष्पादन के लिए सही नाम दिया गया है:

If you change the name of the outputted file, Visual Studio is smart enough to generate the new filename correctly. यदि आप outputted फ़ाइल का नाम बदलने के लिए, दृश्य स्टूडियो काफी चतुर को नए फ़ाइल नाम सही ढंग से उत्पन्न है.

Enjoy Configuring! विन्यस्त आनंद लीजिए!

This article was originally written on 10/17/06 Tagged with: यह आलेख मूल रूप से 10/17/06 टैग पर लिखा था: Programming प्रोग्रामिंग

Daily Email Updates दैनिक ईमेल अपडेट

You can get our how-to articles in your inbox each day for free. आप अपने इनबॉक्स में हमारे कैसे लेख को मुफ्त के लिए प्रत्येक दिन प्राप्त कर सकते हैं. Just enter your name and email below: बस नीचे अपना नाम और ईमेल दर्ज करें:


Name: नाम:
Email: ईमेल:

Comments (1) टिप्पणियाँ (1)

  1. renuka रेणुका

    thank you very much really helpful , thanks a lot बहुत बहुत धन्यवाद वास्तव में उपयोगी, बहुत बहुत धन्यवाद


Leave a Comment एक टिप्पणी छोड़ दो




Leave your छोड़ अपने friendly मित्र comment here. यहाँ टिप्पणी नहीं.

If you have a computer help question, यदि आप एक कंप्यूटर की मदद सवाल है, click here to leave it on the forums यहाँ क्लिक करें यह मंचों पर जाने के लिए instead. बजाय.

Note: Your comment may not show up immediately on the site. ध्यान दें: आपकी टिप्पणी को तुरंत नहीं दिखा साइट पर कर सकते हैं.

Our Friends हमारे दोस्त
Getting Started प्रारंभ करना


About How-To Geek के बारे में कैसे करने के लिए geek -
What Is That Process? यह प्रक्रिया क्या है?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe dwm.exe
ctfmon.exe ctfmon.exe
wmpnetwk.exe wmpnetwk.exe
mDNSResponder.exe mDNSResponder.exe
wmpnscfg.exe wmpnscfg.exe
rundll32.exe rundll32.exe
wfcrun32.exe wfcrun32.exe
Ipoint.exe Ipoint.exe
Itype.exe Itype.exe
Wfica32.exe Wfica32.exe
Mobsync.exe Mobsync.exe
conhost.exe conhost.exe
Dpupdchk.exe Dpupdchk.exe Adobe_Updater.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. कॉपीराइट © HowToGeek.com 2006-2009. All Rights Reserved. सर्वाधिकार सुरक्षित.