newrelic/nuget-azure-cloud-services — pull request #23 by chartek (2014-01-09 17:17:55+00:00)
Title: WIP: Specify LICENSE_KEY in ServiceConfiguration.cscfg

__WORK IN PROGRESS - Please Do Not Merge__

Adds the ability to specify the New Relic license key in the ServiceConfiguration.*.cscfg files. That value is then used as an environment variable when running `newrelic.cmd` to install the .NET Agent and Server Monitor.

An example `ServiceConfiguration.Cloud.cscfg` looks like this:

```xml

```

An example `ServiceDefinition.csdef` looks like this:
```xml

```

### Caution
I have a version of this in a custom NuGet package that is used on a production system. I extracted part of that code for this pull request. And while I did test installing and uninstalling this pull request as a new NuGet package in a test project, I have not tested it working in an Azure deployment yet.

### Other Notes
When installing this NuGet package, it will check the ServiceConfiguration.*.cscfg file for an existing `NewRelic.LicenseKey` setting. If it exists, the installer will not ask the user for it again. However, the uninstaller automatically removes this setting so it gets removed when an NuGet update occurs. This could be solved if the uninstaller doesn't remove the configuration setting, but then it will remain when the user really wants to uninstall the package completely.