diff --git a/Glimpse.sln b/Glimpse.sln index e0cf7cc5..93c8f95f 100644 --- a/Glimpse.sln +++ b/Glimpse.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26014.0 +VisualStudioVersion = 15.0.27130.2036 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6AD4BC4F-CA12-4EE0-A6D5-BBE4B9CC56EC}" ProjectSection(SolutionItems) = preProject @@ -123,4 +123,7 @@ Global {0E1D8B8D-A560-47CF-8CE7-DC7FEA6226D1} = {214245A9-D0ED-479C-B514-B482510C5F73} {E617C9BC-502D-41E3-9F0C-20487EEBA148} = {214245A9-D0ED-479C-B514-B482510C5F73} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FDAFE111-2523-4913-8451-FBC0211364FC} + EndGlobalSection EndGlobal diff --git a/README.md b/README.md new file mode 100644 index 00000000..2144a2ff --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Glimpse.Prototype +Glimpse v2 prototype + +This is a fork of the Glimpse prototype that has been adapted to work with ASP.NET Core 2.0 + +If you need MVC integration then you will need to make the following changes to get it working +(this is because the Razor engine has been heavily refactored between ASP.NET Core 1.1 and 2.0) + +In _ViewImports.cshtml include the following; + +```` +@addTagHelper *, Glimpse.Agent.AspNet.Mvc +```` + +In _Layout.cshtml, revise the body tag to include the tag-helper; + +```` + +```` + +At some point I'll fix the code so this is done automatically - I just haven't worked out how yet! diff --git a/global.json b/global.json index f7f64da8..45a43f49 100644 --- a/global.json +++ b/global.json @@ -2,8 +2,5 @@ "projects": [ "src", "test/websites" - ], - "sdk": { - "version": "1.0.0-preview2-003121" - } + ] } \ No newline at end of file diff --git a/pack.cmd b/pack.cmd index ffb11e90..2e9e5e30 100644 --- a/pack.cmd +++ b/pack.cmd @@ -10,7 +10,7 @@ md dist REM get time For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set DATE=%%c%%a%%b) -For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set TIME=%%a%%b) +For /f "tokens=1-2 delims=/: " %%a in ("%TIME%") do (set TIME=%%a%%b) set MILESTONE=beta2-%DATE%%TIME% diff --git a/sample/Glimpse.Agent.AspNet.Sample/Glimpse.Agent.AspNet.Sample.csproj b/sample/Glimpse.Agent.AspNet.Sample/Glimpse.Agent.AspNet.Sample.csproj index db470179..720c104e 100644 --- a/sample/Glimpse.Agent.AspNet.Sample/Glimpse.Agent.AspNet.Sample.csproj +++ b/sample/Glimpse.Agent.AspNet.Sample/Glimpse.Agent.AspNet.Sample.csproj @@ -1,16 +1,11 @@ - netcoreapp1.0 + netcoreapp2.0 true Glimpse.Agent.AspNet.Sample Exe - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - - - PreserveNewest - - @@ -18,11 +13,10 @@ - - - - - + + + + $(DefineConstants);RELEASE diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Controllers/ManageController.cs b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Controllers/ManageController.cs index b60e5d77..e3b4c49e 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Controllers/ManageController.cs +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Controllers/ManageController.cs @@ -287,7 +287,8 @@ public async Task ManageLogins(ManageMessageId? message = null) return View("Error"); } var userLogins = await _userManager.GetLoginsAsync(user); - var otherLogins = _signInManager.GetExternalAuthenticationSchemes().Where(auth => userLogins.All(ul => auth.AuthenticationScheme != ul.LoginProvider)).ToList(); + var otherLoginsResult = await _signInManager.GetExternalAuthenticationSchemesAsync(); + var otherLogins = otherLoginsResult.Where(auth => userLogins.All(ul => auth.Name != ul.LoginProvider)).ToList(); ViewData["ShowRemoveButton"] = user.PasswordHash != null || userLogins.Count > 1; return View(new ManageLoginsViewModel { diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Data/ApplicationDbContext.cs b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Data/ApplicationDbContext.cs index bc0cb170..155ac232 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Data/ApplicationDbContext.cs +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Data/ApplicationDbContext.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; +using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Glimpse.AgentServer.AspNet.Mvc.Sample.Models; diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Glimpse.AgentServer.AspNet.Mvc.Sample.csproj b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Glimpse.AgentServer.AspNet.Mvc.Sample.csproj index b2552aa0..cdfac3b4 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Glimpse.AgentServer.AspNet.Mvc.Sample.csproj +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Glimpse.AgentServer.AspNet.Mvc.Sample.csproj @@ -1,17 +1,12 @@ - + - netcoreapp1.0 + netcoreapp2.0 true Glimpse.AgentServer.AspNet.Mvc.Sample Exe aspnet-Glimpse.AgentServer.AspNet.Mvc.Sample-dbd166cf-e778-4976-a0f5-6c3de1011986 - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - - - PreserveNewest - - @@ -23,40 +18,39 @@ - - - - - - - - - - + + + + + + + + + - 1.0.2 + 2.0.0-preview1-final All - 1.0.0-preview4-final + 2.0.1 All - - - - - - - + + + + + + + - 1.0.0-msbuild2-final + 2.0.2 All - - - + + + $(DefineConstants);RELEASE diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ApplicationUser.cs b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ApplicationUser.cs index 3b61d229..db31229b 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ApplicationUser.cs +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ApplicationUser.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; +using Microsoft.AspNetCore.Identity; namespace Glimpse.AgentServer.AspNet.Mvc.Sample.Models { diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ManageViewModels/ManageLoginsViewModel.cs b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ManageViewModels/ManageLoginsViewModel.cs index cae274d0..acc0fd42 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ManageViewModels/ManageLoginsViewModel.cs +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Models/ManageViewModels/ManageLoginsViewModel.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http.Authentication; +using System.Collections.Generic; +using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Identity; namespace Glimpse.AgentServer.AspNet.Mvc.Sample.Models.ManageViewModels @@ -11,6 +8,6 @@ public class ManageLoginsViewModel { public IList CurrentLogins { get; set; } - public IList OtherLogins { get; set; } + public IList OtherLogins { get; set; } } } diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Startup.cs b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Startup.cs index 14e6564d..f90cab91 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Startup.cs +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Startup.cs @@ -12,6 +12,7 @@ using Glimpse.AgentServer.AspNet.Mvc.Sample.Data; using Glimpse.AgentServer.AspNet.Mvc.Sample.Models; using Glimpse.AgentServer.AspNet.Mvc.Sample.Services; +using Microsoft.AspNetCore.Identity; namespace Glimpse.AgentServer.AspNet.Mvc.Sample { diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Account/Login.cshtml b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Account/Login.cshtml index d8038193..5c3565c7 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Account/Login.cshtml +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Account/Login.cshtml @@ -59,7 +59,8 @@

Use another service to log in.


@{ - var loginProviders = SignInManager.GetExternalAuthenticationSchemes().ToList(); + var loginProvidersResult = await SignInManager.GetExternalAuthenticationSchemesAsync(); + var loginProviders = loginProvidersResult.ToList(); if (loginProviders.Count == 0) {
@@ -76,7 +77,7 @@

@foreach (var provider in loginProviders) { - + }

diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Manage/ManageLogins.cshtml b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Manage/ManageLogins.cshtml index cb764d4a..65768296 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Manage/ManageLogins.cshtml +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Manage/ManageLogins.cshtml @@ -46,7 +46,7 @@

@foreach (var provider in Model.OtherLogins) { - + }

diff --git a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Shared/_Layout.cshtml b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Shared/_Layout.cshtml index dbc59bbc..c7ea064b 100644 --- a/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Shared/_Layout.cshtml +++ b/sample/Glimpse.AgentServer.AspNet.Mvc.Sample/Views/Shared/_Layout.cshtml @@ -16,7 +16,7 @@ - +