Skip to content

"Copy To Output Directory" setting requires file to be added to solution #25

Description

@jez9999

In the documentation, it recommends setting Copy To Output Directory = Copy Always for each config file so that they are copied to the output directory. But doesn't this miss the whole point of using NConfig? The idea is that the config file does not necessarily exist. That way, I can provide the file on my developer system but not provide it on the live system so it falls back to Web.config. More importantly I can exclude the developer config files from source control so that developer passwords etc. are not checked in. This means I don't want to add these config files to the solution. But in order to have the Copy To Output Directory setting available, I have to add the config file to the solution. Is this not a contradiction?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions