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

Commit 0a28805

Browse files
committed
Update to deal with latest breaking changes from aspnet
1 parent a062780 commit 0a28805

35 files changed

Lines changed: 660 additions & 103 deletions

File tree

sample/Glimpse.Agent.Dnx.Sample/Startup.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Glimpse.Agent;
33
using Glimpse.Initialization;
44
using Microsoft.AspNet.Builder;
5-
using Microsoft.Extensions.Configuration;
5+
using Microsoft.AspNet.Hosting;
66
using Microsoft.Extensions.DependencyInjection;
77

88
namespace Glimpse.Agent.Dnx.Sample
@@ -16,9 +16,7 @@ public Startup()
1616
Console.WriteLine("==================================\n");
1717
Console.ResetColor();
1818
}
19-
20-
public IConfiguration Configuration { get; set; }
21-
19+
2220
public void ConfigureServices(IServiceCollection services)
2321
{
2422
/* Example of how to use fixed provider
@@ -50,5 +48,15 @@ public void Configure(IApplicationBuilder app)
5048

5149
app.UseWelcomePage();
5250
}
51+
52+
public static void Main(string[] args)
53+
{
54+
var application = new WebApplicationBuilder()
55+
.UseConfiguration(WebApplicationConfiguration.GetDefault(args))
56+
.UseStartup<Startup>()
57+
.Build();
58+
59+
application.Run();
60+
}
5361
}
5462
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"server": "Microsoft.AspNet.Server.Kestrel",
3+
"server.urls": "http://localhost:5200"
4+
}
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
2-
"webroot": "wwwroot",
3-
"version": "1.0.0-*",
4-
"exclude": [
5-
"wwwroot"
6-
],
7-
"packExclude": [
8-
"**.kproj",
9-
"**.user",
10-
"**.vspscc"
11-
],
12-
"commands": {
13-
"web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5200",
14-
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5200"
15-
},
2+
"version": "1.0.0-*",
163
"dependencies": {
174
"Glimpse.Agent.Dnx": "",
5+
"Microsoft.AspNet.Hosting": "1.0.0-*",
186
"Microsoft.AspNet.Diagnostics": "1.0.0-*",
197
"Microsoft.AspNet.Server.Kestrel": "1.0.0-*",
208
"Microsoft.AspNet.Server.WebListener": "1.0.0-*"
219
},
2210
"frameworks": {
2311
"dnx451": { }
12+
},
13+
"exclude": "wwwroot/**/*.*",
14+
"packExclude": [
15+
"**.kproj",
16+
"**.user",
17+
"**.vspscc"
18+
],
19+
"compilationOptions": {
20+
"emitEntryPoint": true
21+
},
22+
"commands": {
23+
"web": "Glimpse.Agent.Dnx.Sample"
2424
}
2525
}

sample/Glimpse.AgentServer.Dnx.Mvc.Sample/Startup.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class Startup
1717
public Startup()
1818
{
1919
Console.ForegroundColor = ConsoleColor.DarkCyan;
20-
Console.WriteLine("\nGLIMPSE AGENT+SERVER (MVC) RUNNING ON PORT 5000");
20+
Console.WriteLine("\nGLIMPSE AGENT+SERVER (MVC) RUNNING ON PORT 5100");
2121
Console.WriteLine("===============================================\n");
2222
Console.ResetColor();
2323
}
@@ -136,5 +136,15 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
136136
// routes.MapWebApiRoute("DefaultApi", "api/{controller}/{id?}");
137137
});
138138
}
139+
140+
public static void Main(string[] args)
141+
{
142+
var application = new WebApplicationBuilder()
143+
.UseConfiguration(WebApplicationConfiguration.GetDefault(args))
144+
.UseStartup<Startup>()
145+
.Build();
146+
147+
application.Run();
148+
}
139149
}
140150
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"server": "Microsoft.AspNet.Server.Kestrel",
3+
"server.urls": "http://localhost:5100"
4+
}

sample/Glimpse.AgentServer.Dnx.Mvc.Sample/project.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
2-
"webroot": "wwwroot",
3-
"userSecretsId": "aspnet5-Glimpse.AgentServer.Dnx.Mvc.Sample-13d51bc5-beea-48f5-a33d-0b583120c537",
42
"version": "1.0.0-*",
53
"dependencies": {
64
"EntityFramework.Commands": "7.0.0-*",
75
"EntityFramework.MicrosoftSqlServer": "7.0.0-*",
86
"Glimpse.Agent.Dnx": "",
97
"Glimpse.Agent.Dnx.Mvc": "",
108
"Glimpse.Server.Dnx": "",
9+
"Microsoft.AspNet.Hosting": "1.0.0-*",
1110
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-*",
1211
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-*",
1312
"Microsoft.AspNet.Authentication.Google": "1.0.0-*",
@@ -29,27 +28,34 @@
2928
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
3029
"Microsoft.Extensions.Logging.Debug": "1.0.0-*"
3130
},
32-
"commands": {
33-
"web": "Microsoft.AspNet.Server.WebListener",
34-
"kestrel": "Microsoft.AspNet.Server.Kestrel",
35-
"ef": "EntityFramework.Commands"
36-
},
3731
"frameworks": {
3832
"dnx451": { },
3933
"dnxcore50": { }
4034
},
4135
"exclude": [
42-
"wwwroot",
36+
"wwwroot/**/*.*",
4337
"node_modules",
4438
"bower_components"
4539
],
40+
"packExclude": [
41+
"**.kproj",
42+
"**.user",
43+
"**.vspscc"
44+
],
45+
"compilationOptions": {
46+
"emitEntryPoint": true
47+
},
48+
"commands": {
49+
"web": "Glimpse.AgentServer.Dnx.Mvc.Sample"
50+
},
4651
"publishExclude": [
4752
"node_modules",
4853
"bower_components",
4954
"**.xproj",
5055
"**.user",
5156
"**.vspscc"
5257
],
58+
"userSecretsId": "aspnet5-Glimpse.AgentServer.Dnx.Mvc.Sample-13d51bc5-beea-48f5-a33d-0b583120c537",
5359
"scripts": {
5460
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
5561
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
/// <autosync enabled="true" />
22
/// <reference path="../gulpfile.js" />
33
/// <reference path="js/site.js" />
4+
/// <reference path="lib/bootstrap/dist/js/bootstrap.js" />
5+
/// <reference path="lib/bootstrap-touch-carousel/dist/js/bootstrap-touch-carousel.js" />
6+
/// <reference path="lib/hammer.js/hammer.js" />
7+
/// <reference path="lib/jquery/dist/jquery.js" />
8+
/// <reference path="lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js" />

sample/Glimpse.AgentServer.Dnx.Mvc.Simple.Sample/Startup.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Glimpse.Agent;
33
using Glimpse.Server;
44
using Microsoft.AspNet.Builder;
5+
using Microsoft.AspNet.Hosting;
56
using Microsoft.Extensions.DependencyInjection;
67

78
namespace Glimpse.AgentServer.Dnx.Mvc.Simple.Sample
@@ -29,5 +30,15 @@ public void Configure(IApplicationBuilder app)
2930

3031
app.UseMvcWithDefaultRoute();
3132
}
33+
34+
public static void Main(string[] args)
35+
{
36+
var application = new WebApplicationBuilder()
37+
.UseConfiguration(WebApplicationConfiguration.GetDefault(args))
38+
.UseStartup<Startup>()
39+
.Build();
40+
41+
application.Run();
42+
}
3243
}
3344
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"server": "Microsoft.AspNet.Server.Kestrel",
3+
"server.urls": "http://localhost:5000"
4+
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
2-
"commands": {
3-
"web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5000",
4-
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5000"
5-
},
2+
"version": "1.0.0-*",
63
"dependencies": {
74
"Glimpse.Agent.Dnx": "",
85
"Glimpse.Agent.Dnx.Mvc": "",
96
"Glimpse.Server.Dnx": "",
7+
"Microsoft.AspNet.Hosting": "1.0.0-*",
108
"Microsoft.AspNet.Mvc": "6.0.0-*",
119
"Microsoft.AspNet.Server.Kestrel": "1.0.0-*",
1210
"Microsoft.AspNet.Server.WebListener": "1.0.0-*"
1311
},
14-
"exclude": [
15-
"wwwroot"
16-
],
1712
"frameworks": {
1813
"dnx451": { },
1914
"dnxcore50": { }
2015
},
16+
"exclude": "wwwroot/**/*.*",
2117
"packExclude": [
2218
"**.kproj",
2319
"**.user",
2420
"**.vspscc"
2521
],
26-
"version": "1.0.0-*",
27-
"webroot": "wwwroot"
22+
"compilationOptions": {
23+
"emitEntryPoint": true
24+
},
25+
"commands": {
26+
"web": "Glimpse.AgentServer.Dnx.Mvc.Simple.Sample"
27+
}
2828
}

0 commit comments

Comments
 (0)