Skip to content

Commit

Permalink
2.1.1 - look for legacy app.config convention of [exec process].exe.c…
Browse files Browse the repository at this point in the history
…onfig
  • Loading branch information
smithrobs committed Dec 7, 2016
1 parent 094cfe9 commit 6096405
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.1.1 (2016-12-06)

* Look for ```<executing process>.exe.config``` file for XML configuration.

# 2.1.0 (2016-11-18)

* User-Agent reporting. You may also append an application-specific ID via settings.json.
Expand Down
2 changes: 2 additions & 0 deletions Nexmo.Api/Configuration.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Microsoft.Extensions.Configuration;
using Nexmo.Api.ConfigurationExtensions;
Expand All @@ -23,6 +24,7 @@ private Configuration()
})
.AddConfigFile("web.config", true)
.AddConfigFile("app.config", true)
.AddConfigFile($"{System.IO.Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName)}.config", true)
.AddJsonFile("settings.json", true, true)
;

Expand Down
7 changes: 4 additions & 3 deletions Nexmo.Api/Nexmo.Api.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Nexmo.Csharp.Client</id>
<version>2.1.0</version>
<version>2.1.1</version>
<title>Nexmo API Client</title>
<authors>Nexmo</authors>
<owners>Nexmo</owners>
Expand All @@ -12,8 +12,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Official C#/.NET wrapper for the Nexmo API</description>
<releaseNotes>
* User-Agent reporting. You may also append an application-specific ID via settings.json.
* [BREAKING] Support web.config XML. This has changed the settings.json structure slightly.
* Look for executing_process_filename.exe.config file for XML configuration.
</releaseNotes>
<copyright>© Nexmo 2016</copyright>
<tags>SMS voice telephony phone nexmo</tags>
Expand All @@ -30,9 +29,11 @@
<dependency id="jose-jwt" version="2.0.*" />
</group>
<group targetFramework="netstandard1.6">
<dependency id="System.Diagnostics.Process" version="4.1.*" />
<dependency id="System.Security.Cryptography.Algorithms" version="4.2.*" />
<dependency id="System.Security.Cryptography.OpenSsl" version="4.0.*" />
<dependency id="System.Security.Cryptography.Cng" version="4.2.*" />
<dependency id="System.Xml.XDocument" version="4.0.*" />
</group>
</dependencies>
</metadata>
Expand Down
4 changes: 2 additions & 2 deletions Nexmo.Api/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyVersion("2.1.1.0")]
[assembly: AssemblyFileVersion("2.1.1.0")]
19 changes: 13 additions & 6 deletions Nexmo.Api/project.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"version": "2.1.0-*",
"version": "2.1.1-*",

"dependencies": {
"Microsoft.Extensions.Configuration": "1.0.*",
"Microsoft.Extensions.Configuration.Json": "1.0.*",
"Microsoft.Extensions.Logging": "1.0.*",
"System.Collections.Immutable": "1.2.*",
"System.Net.Http": "4.*",
"System.Runtime.Extensions": "4.1.*",

"Newtonsoft.Json": "9.0.*",
"jose-jwt": "2.0.*"
Expand All @@ -16,34 +14,43 @@
"frameworks": {
"net452": {
"frameworkAssemblies": {
"System.Net.Http": "4.0.*",
"System.Runtime.Extensions": "4.0.*",
"System.Xml": "4.0.0.0",
"System.Xml.Linq": "4.0.0.0"
}
},
"net46": {
"frameworkAssemblies": {
"System.Net.Http": "4.0.*",
"System.Runtime.Extensions": "4.0.10.*",
"System.Xml": "4.0.0.0",
"System.Xml.Linq": "4.0.0.0"
}
},
"net461": {
"frameworkAssemblies": {
"System.Net.Http": "4.0.*",
"System.Runtime.Extensions": "4.0.10.*",
"System.Xml": "4.0.0.0",
"System.Xml.Linq": "4.0.0.0"
}
},
"net462": {
"frameworkAssemblies": {
"System.Net.Http": "4.0.*",
"System.Runtime.Extensions": "4.0.10.*",
"System.Xml": "4.0.0.0",
"System.Xml.Linq": "4.0.0.0"
}
},
"netstandard1.6": {
"dependencies": {
"NETStandard.Library": "1.6.0",
"System.Security.Cryptography.Algorithms": "4.2.0",
"System.Security.Cryptography.OpenSsl": "4.0.0",
"System.Security.Cryptography.Cng": "4.2.0",
"System.Diagnostics.Process": "4.1.*",
"System.Security.Cryptography.Algorithms": "4.3.0",
"System.Security.Cryptography.OpenSsl": "4.3.0",
"System.Security.Cryptography.Cng": "4.3.0",
"System.Xml.XDocument": "4.0.*"
}
}
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,15 @@ Configuration:
</appSettings>
```

* ```settings.json``` takes precedence over ```web.config```. As you are able, please move your project
to JSON configuration as this will be going away in a future release.
* In the event multiple configuration files are found, the order of precedence is as follows:

* ```settings.json``` which overrides
* ```<executing process name>.config``` which overrides
* ```app.config``` which overrides
* ```web.config```

* As you are able, please move your project to JSON configuration as XML
configuration will be going away in a future release.

Examples
--------
Expand Down

0 comments on commit 6096405

Please sign in to comment.