Read config file gac




















Good Luck,. Niro Niro 1 1 gold badge 2 2 silver badges 12 12 bronze badges. Additionally, i have provided some of configuraiton properties as browsable property for the dll so, consumable control will set these prior and those properties will be refer in dll instead of read the configuration file. The Overflow Blog. Podcast Making Agile work for data science.

Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked Related However, my DLL has a configuration file.

Saturday, November 17, PM. It is no longer true that you cannot create config files for DLLs. As of. The config file has to be in the same location as the DLL with. If you follow those rules then ConfigurationManager. I use that in my library. The limitation is that if you have other code that makes a reference copy of your DLL, the config file will not come with it. But if you turn off reference copying in dependent projects, then it will reference the DLL in its installed location where the config file will be found.

Hopefully Microsoft addressed this in Visual Studio or a patch to Ideally if there is a config file present then it should be copied along with the DLL. You are right in that you cannot add text files to the GAC. However I did some more research and found that I can use the ConfigurationManager. OpenMappedExeConfiguration method to provide the full path name of the config file. Sunday, November 18, PM. You cannot create config files for dlls.

If you use code in your dll to read data from config files, it will search for these data in the exe's config file or the web. If you need to read data from config files for your dll, you may try to write code to manually open a text or xml file and read the configuration from it. I don't know if you can add text files to GAC. My current project requires a business layer that will be used by multiple applications, which is a great use of the GAC.

There are some settings that will be needed by this business layer. So the question is: How do I get the app. It took some figuring out but I found a way. It's not the cleanest way but it works. All you need to do is setup your settings for the built in app. Posted by Cody Schouten at PM. Newer Post Older Post Home.



0コメント

  • 1000 / 1000