locked
Problems moving data access to a separate dll RRS feed

  • Question

  • I tried moving my data access to a separate dll, but I keep getting an exception, the framework is accessing the application settings file, not the dll settings file.  I check the file gets copied and all the info is in there but it the framework accesses the main application settings file.

    Friday, August 25, 2017 5:26 PM

All replies

  • That is how framework is designed to work, it will read from the config file of which the executable is running from.

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]


    Blog | LinkedIn | Stack Overflow | Facebook
    profile for Ehsan Sajjad on Stack Exchange, a network of free, community-driven Q&A sites

    Friday, August 25, 2017 6:21 PM
  • Kind of hard to move data to a separate dll then if you are using the Entity Framework.
    Friday, August 25, 2017 7:05 PM
  • Hi OpenXmlMadCoder,

    If you want to access the config file of dll, you would like to check the following link.

    https://www.sep.com/sep-blog/2010/09/05/configuration-settings-for-net-class-libraries-dlls/

    It shows four ways about how does one specify different settings in different calling environments.

    Best Regards,

    Wendy

    Note: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. 

    Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.

    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet. 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, August 30, 2017 5:26 AM