An open API service indexing awesome lists of open source software.

https://github.com/paralect/setty

Setty component solves two common problems - management of key-value settings and management of .NET config files (App.config and Web.config)
https://github.com/paralect/setty

Last synced: 6 months ago
JSON representation

Setty component solves two common problems - management of key-value settings and management of .NET config files (App.config and Web.config)

Awesome Lists containing this project

README

          

Overview
---------------------
Setty was designed to make managing project key/value settings easier. .NET config files may vary for different deployment configurations. Setty provides a way to manage config files for different deployment configurations. It uses centralised approach by generating *.config files based on some template language. Currently there is support for razor and xslt transform engines.

Setty with razor syntax require .net 4.0+. .net 2.0 version currently support only xslt transformation engine and has to be installed manually. See documentation below for details

Installation guide
---------------------
The best way to getting started with Setty is download plugin for visual studio 2010. And install setty in one click.
Plugin will configure everything for you.

1. Open Visual Studio and navigate to Tools -> Extentions Manager.
2. Search in Online Gallery for work 'Setty' and double click to install (reload Visual Studio after this). Or alternatively download extension [Setty VS 2010 addin](https://github.com/downloads/paralect/setty/Setty.VsAddin.vsix)
![add vs extension](http://paralect.github.com/setty/images/add_vs_extention.png)
3. Create new project (or open existing one), right click on it. In context menu navigate to Add -> Add Setty...
![add vs extension](http://paralect.github.com/setty/images/images/add_setty.png)
4. Plugin ask you where to create global settings folder. Usually this folder is on top of solution folder.
![add vs extension](http://paralect.github.com/setty/images/browse_settings_folder.png)
5. Congratulations! You are done. Now you can start use Setty.

Quick start
---------------------
By default setty use Razor syntax to transform setty config (Web.config.cshtml on above screen).
Settings Folder is a simple concept of hierarchical configuration system well understood by many ASP.NET developers. The more deeper your configuration file is located the more precedence your configuration file has comparing to outer configuration files. This is a simple way to overwrite outer configuration. Here is example from real world:

![example](http://paralect.github.com/setty/images/settings_folder.png)

To try it out navigate to the settings folder which you've specified on 4th step. There you'll find App.config file. This file is a simple storage of key/value settings. Settings Folder has only one configuration file named App.config. Content of this file is a plain .NET appSettings section.

Open it and add new setting:
``` xml



```
After this open your setty config file (In my case it's Web.config.cshtml) and use setting as follow:
``` xml



...
```
Rebuild project and open Web.config file, there should be following result:
``` xml



...
```

Real world Setty config files
---------------------

Below example show not only how to use Setty, but also flexibility that Setty provide by adding support
of variables, conditions, whatever transformation language support.

Razor transformation engine:

``` xml






@if(Model["Email"] == "Compress")
{




...


}
...


```

Xslt transformation engine:

``` xml











...

...

```

Updates
---------------------
1. 09/25/2012 -- VS Plugin for visual studio 2012

Read more documentation on a Setty site.