Skip to content

Commit 20cbb96

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

16 files changed

+17464
-7644
lines changed

NuGet.Config

+8
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

+2-1
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

+2
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

+1-1
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

-2
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

+7-6
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

+1-1
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

+1-2
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>
File renamed without changes.

src/gitattributes.xproj

+1-1
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>

src/project.json

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
{
1+
{
22
"webroot": "wwwroot",
33
"version": "0.1.0-*",
44

5-
"dependencies": {
6-
"Microsoft.AspNet.Diagnostics": "1.0.0-beta4",
7-
"Microsoft.AspNet.Mvc": "6.0.0-beta4",
8-
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta4",
9-
"Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
10-
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
11-
"Microsoft.AspNet.StaticFiles": "1.0.0-beta4",
12-
"Microsoft.AspNet.Tooling.Razor": "1.0.0-beta4",
13-
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
14-
"Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta4",
15-
"Microsoft.Framework.Logging": "1.0.0-beta4",
16-
"Microsoft.Framework.Logging.Console": "1.0.0-beta4",
17-
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta4",
18-
"Microsoft.ApplicationInsights.AspNet": "0.32.0-beta4"
19-
},
5+
"dependencies": {
6+
"Microsoft.AspNet.Diagnostics": "1.0.0-beta7",
7+
"Microsoft.AspNet.Mvc": "6.0.0-beta7",
8+
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta7",
9+
"Microsoft.AspNet.Server.IIS": "1.0.0-beta7",
10+
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta7",
11+
"Microsoft.AspNet.StaticFiles": "1.0.0-beta7",
12+
"Microsoft.AspNet.Tooling.Razor": "1.0.0-beta7",
13+
"Microsoft.Framework.Configuration.Json": "1.0.0-beta7",
14+
"Microsoft.Framework.Logging": "1.0.0-beta7",
15+
"Microsoft.Framework.Logging.Console": "1.0.0-beta7",
16+
"Microsoft.Framework.Logging.Debug": "1.0.0-beta7",
17+
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta7",
18+
"Microsoft.ApplicationInsights.AspNet": "1.0.0-beta7",
19+
"Microsoft.Dnx.Runtime": "1.0.0-beta7"
20+
},
2021

2122
"commands": {
2223
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",

0 commit comments

Comments
 (0)