Learn from my mistakes, you don't have time to make them yourself

NewRelic Azure NuGet package update pain again

I previously posted about issues I found when updating to the latest Azure NuGet package published by NewRelic. Unfortunately the install PowerShell script for the latest package now has more issues than the previous version. Here are the issues I found and how to fix them.

newrelic.cmd not updated
I believe the issue here (unconfirmed) is that the file is not updated because it has been changed as part of the previous package installation. The fix is to uninstall the previous package first and then manually delete the newrelic.cmd file. The uninstall won’t remove the file for the same reason.

The license key is not written to newrelic.cmd
This is a bug in the newrelic.cmd file published with the package. The install script is expect the file to have the line SET LICENSE_KEY=REPLACE_WITH_LICENSE_KEY so that the installer can substitute the value. Unfortunately the cmd file in the package has an actual license key rather than the expected placeholder. This means someone else’s license key will be used rather than your own.

Same as my previous experience, ServiceDefinition.csdef was not found. You need to manually update this file to contain the following XML (slightly different to the previous version).