Skip to content

Commit 20cbb96

Browse files
committed
Updated webapp to use ASP.NET 5 beta 7.
1 parent 003e6f4 commit 20cbb96

File tree

16 files changed

+17464
-7644
lines changed

16 files changed

+17464
-7644
lines changed

NuGet.Config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
5+
<clear />
6+
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
7+
</packageSources>
8+
</configuration>

gitattributes.sln

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.22823.1
4+
VisualStudioVersion = 14.0.23107.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CFCC326F-2A99-4985-8612-50C8DB63DBA3}"
77
ProjectSection(SolutionItems) = preProject
88
global.json = global.json
9+
NuGet.Config = NuGet.Config
910
EndProjectSection
1011
EndProject
1112
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "gitattributes", "src\gitattributes.xproj", "{D4639383-C092-498C-9317-41528E5489DB}"

gitattributes.sln.DotSettings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantArgumentNameForLiteralExpression/@EntryIndexedValue">DO_NOT_SHOW</s:String></wpf:ResourceDictionary>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"projects": [ "src", "test" ],
33
"sdk": {
4-
"version": "1.0.0-beta4"
4+
"version": "1.0.0-beta7"
55
}
66
}

src/Controllers/ApiController.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
using GitAttributesWeb.Utils;
77
using Microsoft.AspNet.Hosting;
88
using Microsoft.AspNet.Mvc;
9-
using Microsoft.Framework.Runtime;
10-
using NuGet;
119

1210
namespace GitAttributesWeb.Controllers
1311
{

src/Startup.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@
99
using Microsoft.AspNet.Http;
1010
using Microsoft.AspNet.Mvc;
1111
using Microsoft.AspNet.Routing;
12-
using Microsoft.Framework.ConfigurationModel;
12+
using Microsoft.Dnx.Runtime;
13+
using Microsoft.Framework.Configuration;
1314
using Microsoft.Framework.DependencyInjection;
1415
using Microsoft.Framework.Logging;
1516

1617
namespace GitAttributesWeb
1718
{
1819
public class Startup
1920
{
20-
public Startup(IHostingEnvironment env)
21+
public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv)
2122
{
2223
// Setup configuration sources.
23-
var configuration = new Configuration()
24+
var configuration = new ConfigurationBuilder(appEnv.ApplicationBasePath)
2425
.AddJsonFile("config.json")
2526
.AddJsonFile($"config.{env.EnvironmentName}.json", optional: true);
2627

@@ -31,7 +32,7 @@ public Startup(IHostingEnvironment env)
3132

3233
configuration.AddEnvironmentVariables();
3334

34-
this.Configuration = configuration;
35+
this.Configuration = configuration.Build();
3536
}
3637

3738
public IConfiguration Configuration { get; set; }
@@ -41,7 +42,7 @@ public void ConfigureServices(IServiceCollection services)
4142
{
4243
services.AddApplicationInsightsTelemetry(Configuration);
4344

44-
services.Configure<AppSettings>(Configuration.GetSubKey("AppSettings"));
45+
services.Configure<AppSettings>(Configuration.GetSection("AppSettings"));
4546

4647
// Add MVC services to the services container.
4748
services.AddMvc();
@@ -75,7 +76,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
7576
if (env.IsEnvironment("Development"))
7677
{
7778
app.UseBrowserLink();
78-
app.UseErrorPage(ErrorPageOptions.ShowAll);
79+
app.UseErrorPage();
7980
}
8081
else
8182
{

src/Utils/StringOutputFormatter2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public override async Task WriteResponseBodyAsync(OutputFormatterContext context
2626
{
2727
string result = string.Join(",", valueAsEnumerable);
2828

29-
var response = context.ActionContext.HttpContext.Response;
29+
var response = context.HttpContext.Response;
3030
await response.WriteAsync(result, context.SelectedEncoding);
3131
return;
3232
}

src/Views/Shared/_Layout.cshtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
@using GitAttributesWeb
2-
@inject IOptions<AppSettings> AppSettings
1+
@inject IOptions<AppSettings> AppSettings
32
@inject Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration TelemetryConfiguration
43
<!DOCTYPE html>
54
<html>

src/gitattributes.xproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717
<PropertyGroup>
1818
<SchemaVersion>2.0</SchemaVersion>
19-
<DevelopmentServerPort>15070</DevelopmentServerPort>
19+
<DevelopmentServerPort>5000</DevelopmentServerPort>
2020
</PropertyGroup>
2121
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
2222
</Project>

0 commit comments

Comments
 (0)