From what I understand, you have a class library with a configuration file with a connection string and are referencing that library in another app. The problem is an app.config (or web.config) is relative to the executing application.
Say your class library is named Shared.dll and have a Shared.dll.config and another application (let's say it's a Console Application) called Application with Application.exe.config. When running that application, the app.config used will be Application.exe.config.
If you are trying trying to access a connection string named TRN_DB
in this application, it will look in the application's configuration file where it is not defined and return null (hence the Reference Exception).