Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit a900d66

Browse files
committed
Fixing CI failure
1 parent df19023 commit a900d66

File tree

2 files changed

+29
-25
lines changed

2 files changed

+29
-25
lines changed

src/Microsoft.Extensions.SecretManager/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
using System;
55
using System.IO;
66
using System.Reflection;
7-
using Microsoft.Extensions.PlatformAbstractions;
87
using Microsoft.Dnx.Runtime.Common.CommandLine;
98
using Microsoft.Extensions.Configuration.UserSecrets;
109
using Microsoft.Extensions.Logging;
10+
using Microsoft.Extensions.PlatformAbstractions;
1111
using Newtonsoft.Json.Linq;
1212

1313
namespace Microsoft.Extensions.SecretManager
@@ -192,11 +192,11 @@ public int Main(string[] args)
192192
private static string GetInformationalVersion()
193193
{
194194
var assembly = typeof(Program).GetTypeInfo().Assembly;
195-
var attributes = assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute[];
195+
var attribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
196196

197-
var versionAttribute = attributes.Length == 0 ?
197+
var versionAttribute = attribute == null ?
198198
assembly.GetName().Version.ToString() :
199-
attributes[0].InformationalVersion;
199+
attribute.InformationalVersion;
200200

201201
return versionAttribute;
202202
}

src/Microsoft.Extensions.SecretManager/project.json

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,31 @@
44
"warningsAsErrors": true,
55
"keyFile": "../../tools/Key.snk"
66
},
7-
"description": "DNX tool to manage user secrets.",
8-
"repository": {
9-
"type": "git",
10-
"url": "git://github.com/aspnet/usersecrets"
11-
},
12-
"dependencies": {
13-
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-*",
14-
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
15-
"Microsoft.Extensions.CommandLineUtils.Sources": { "version": "1.0.0-*", "type": "build" },
16-
"Microsoft.Extensions.Logging": "1.0.0-*",
17-
"Newtonsoft.Json": "6.0.6"
18-
},
19-
"commands": {
20-
"user-secret": "Microsoft.Extensions.SecretManager"
7+
"description": "DNX tool to manage user secrets.",
8+
"repository": {
9+
"type": "git",
10+
"url": "git://github.com/aspnet/usersecrets"
11+
},
12+
"dependencies": {
13+
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-*",
14+
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
15+
"Microsoft.Extensions.CommandLineUtils.Sources": {
16+
"version": "1.0.0-*",
17+
"type": "build"
2118
},
22-
"frameworks": {
23-
"dnx451": { },
24-
"dnxcore50": {
25-
"dependencies": {
26-
"System.Console": "4.0.0-beta-*"
27-
}
28-
}
19+
"Microsoft.Extensions.Logging": "1.0.0-*",
20+
"Newtonsoft.Json": "6.0.6"
21+
},
22+
"commands": {
23+
"user-secret": "Microsoft.Extensions.SecretManager"
24+
},
25+
"frameworks": {
26+
"dnx451": { },
27+
"dnxcore50": {
28+
"dependencies": {
29+
"System.Console": "4.0.0-beta-*",
30+
"System.Reflection.Extensions": "4.0.1-beta-*"
31+
}
2932
}
33+
}
3034
}

0 commit comments

Comments
 (0)