Heidelbergensis
Heidelbergensis

Reputation: 475

Externally editable strings in .NET assemblies?

Is it possible to have strings in a .NET assembly that can be edited by some external tool? If it is, what tool?

For instance for a single-file Windows Forms application that can be installed simply by copying the single file (no installer required), and where a build system (or a manual process) configures the application on a per-client basis by changing/setting some strings before being distributed to the install location.

I know that this would normally be in a configuration file, but it is useful for simplicity of installation/configuration.

Upvotes: 1

Views: 118

Answers (2)

MaLio
MaLio

Reputation: 2530

Add a text file (or XML file) as an embedded resource. Before compliling you can modify its content to suit. Your application can the access the file and read the values contained therein.

Upvotes: 3

Brian Scott
Brian Scott

Reputation: 9361

Have a look at .NET Satellite Assemblies and the role that they have in language / string customisation.

Satellite assemblies

Upvotes: 1

Related Questions