From d6ed8a54e1c3bdb3408dada0af4761e67de775d1 Mon Sep 17 00:00:00 2001 From: Christian Nagel Date: Sun, 23 Jun 2019 20:00:28 +0200 Subject: [PATCH 1/9] package updates for preview 6 --- .../01-Start/BlazorInsider.App/BlazorInsider.App.csproj | 6 +++--- .../BlazorInsider.Worker/BlazorInsider.Worker.csproj | 4 ++-- Sessions/aspNet/03-Orders/01-Start/global.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/BlazorInsider.App.csproj b/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/BlazorInsider.App.csproj index fac68d0..b0964b6 100644 --- a/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/BlazorInsider.App.csproj +++ b/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/BlazorInsider.App.csproj @@ -6,9 +6,9 @@ - - - + + + diff --git a/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.Worker/BlazorInsider.Worker.csproj b/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.Worker/BlazorInsider.Worker.csproj index aa6a3f3..cac4dd4 100644 --- a/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.Worker/BlazorInsider.Worker.csproj +++ b/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.Worker/BlazorInsider.Worker.csproj @@ -11,11 +11,11 @@ - + - + diff --git a/Sessions/aspNet/03-Orders/01-Start/global.json b/Sessions/aspNet/03-Orders/01-Start/global.json index ccc5beb..3d9fdb9 100644 --- a/Sessions/aspNet/03-Orders/01-Start/global.json +++ b/Sessions/aspNet/03-Orders/01-Start/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "3.0.100-preview5-011568" + "version": "3.0.100-preview6-012264" } } \ No newline at end of file From 56882a1e901116ae07f5d8b02e83a762c64ad0e9 Mon Sep 17 00:00:00 2001 From: Christian Nagel Date: Sun, 23 Jun 2019 20:03:03 +0200 Subject: [PATCH 2/9] Razor syntax updates --- .../BlazorInsider.App/Pages/Counter.razor | 4 ++-- .../BlazorInsider.App/Pages/FetchData.razor | 2 +- .../BlazorInsider.App/Pages/Index.razor | 22 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/Counter.razor b/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/Counter.razor index e724406..ea87f6b 100644 --- a/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/Counter.razor +++ b/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/Counter.razor @@ -4,9 +4,9 @@

Current count: @currentCount

- + -@functions { +@code { int currentCount = 0; void IncrementCount() diff --git a/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/FetchData.razor b/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/FetchData.razor index 4b4223c..7ef7dd2 100644 --- a/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/FetchData.razor +++ b/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/FetchData.razor @@ -35,7 +35,7 @@ else } -@functions { +@code { WeatherForecast[] forecasts; protected override async Task OnInitAsync() diff --git a/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/Index.razor b/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/Index.razor index 654bb9d..c5ef734 100644 --- a/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/Index.razor +++ b/Sessions/aspNet/03-Orders/01-Start/BlazorInsider.App/Pages/Index.razor @@ -8,15 +8,15 @@ - + - + - +
Description:
Quantity:
Total:
@@ -24,8 +24,8 @@ - - + +
@@ -64,12 +64,12 @@ else } -@functions { - int orderId; - string description; - int quantity; - double total; - List orders; +@code { + private int orderId; + private string description; + private int quantity; + private double total; + private List orders; void SaveOrder() { From 4c49cade8c649f74bf7b9fe2f0346f355b32ab63 Mon Sep 17 00:00:00 2001 From: Christian Nagel Date: Sun, 23 Jun 2019 20:08:41 +0200 Subject: [PATCH 3/9] package updates --- .../02-End/BlazorInsider.App/BlazorInsider.App.csproj | 6 +++--- .../02-End/BlazorInsider.Worker/BlazorInsider.Worker.csproj | 6 +++--- Sessions/aspNet/03-Orders/02-End/global.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/BlazorInsider.App.csproj b/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/BlazorInsider.App.csproj index fac68d0..b0964b6 100644 --- a/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/BlazorInsider.App.csproj +++ b/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/BlazorInsider.App.csproj @@ -6,9 +6,9 @@ - - - + + + diff --git a/Sessions/aspNet/03-Orders/02-End/BlazorInsider.Worker/BlazorInsider.Worker.csproj b/Sessions/aspNet/03-Orders/02-End/BlazorInsider.Worker/BlazorInsider.Worker.csproj index aa6a3f3..3361f61 100644 --- a/Sessions/aspNet/03-Orders/02-End/BlazorInsider.Worker/BlazorInsider.Worker.csproj +++ b/Sessions/aspNet/03-Orders/02-End/BlazorInsider.Worker/BlazorInsider.Worker.csproj @@ -11,11 +11,11 @@ - - + + - + diff --git a/Sessions/aspNet/03-Orders/02-End/global.json b/Sessions/aspNet/03-Orders/02-End/global.json index ccc5beb..3d9fdb9 100644 --- a/Sessions/aspNet/03-Orders/02-End/global.json +++ b/Sessions/aspNet/03-Orders/02-End/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "3.0.100-preview5-011568" + "version": "3.0.100-preview6-012264" } } \ No newline at end of file From 19f6e850e3c85bd8688584cb5944531a3f63c46e Mon Sep 17 00:00:00 2001 From: Christian Nagel Date: Sun, 23 Jun 2019 20:08:52 +0200 Subject: [PATCH 4/9] blazor syntax updates --- .../02-End/BlazorInsider.App/Pages/Counter.razor | 4 ++-- .../02-End/BlazorInsider.App/Pages/FetchData.razor | 2 +- .../02-End/BlazorInsider.App/Pages/Index.razor | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/Counter.razor b/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/Counter.razor index e724406..ea87f6b 100644 --- a/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/Counter.razor +++ b/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/Counter.razor @@ -4,9 +4,9 @@

Current count: @currentCount

- + -@functions { +@code { int currentCount = 0; void IncrementCount() diff --git a/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/FetchData.razor b/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/FetchData.razor index 4b4223c..7ef7dd2 100644 --- a/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/FetchData.razor +++ b/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/FetchData.razor @@ -35,7 +35,7 @@ else } -@functions { +@code { WeatherForecast[] forecasts; protected override async Task OnInitAsync() diff --git a/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/Index.razor b/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/Index.razor index f5f3d75..6004351 100644 --- a/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/Index.razor +++ b/Sessions/aspNet/03-Orders/02-End/BlazorInsider.App/Pages/Index.razor @@ -8,15 +8,15 @@ - + - + - +
Description:
Quantity:
Total:
@@ -24,8 +24,8 @@ - - + +
@@ -64,7 +64,7 @@ else } -@functions { +@code { string description; int quantity; double total; From 812bed7e94152497e9240972cf7b98432825146d Mon Sep 17 00:00:00 2001 From: Christian Nagel Date: Sun, 23 Jun 2019 20:12:12 +0200 Subject: [PATCH 5/9] in step 4 the project was named 'BlazorSample'. Fixed the following references. --- Sessions/aspNet/01-Blazor/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sessions/aspNet/01-Blazor/README.md b/Sessions/aspNet/01-Blazor/README.md index 53bd296..123a2b2 100644 --- a/Sessions/aspNet/01-Blazor/README.md +++ b/Sessions/aspNet/01-Blazor/README.md @@ -9,17 +9,17 @@ ![](Images/BlazorTemplates.png) 6. Show to the audience the various projects in Solution Explorer and explain their meaning: - - **BlazorGridSample.Client** is the main project and it runs completely client side thanks to WebAssembly - - **BlazorGridSample.Server** is the backend, which supports operations that can be performed only server-side, like accessing to a database - - **BlazorGridSample.Shared** is a .NET Standard library. Since both are ASP.NET Core projects, you can freely share code between the two. This project contains the definition of an entity, **WeatherForecast**, which is shared across the two. -7. Make sure **BlazorGridSample.Server** is set as startup project and press F5. + - **BlazorSample.Client** is the main project and it runs completely client side thanks to WebAssembly + - **BlazorSample.Server** is the backend, which supports operations that can be performed only server-side, like accessing to a database + - **BlazorSample.Shared** is a .NET Standard library. Since both are ASP.NET Core projects, you can freely share code between the two. This project contains the definition of an entity, **WeatherForecast**, which is shared across the two. +7. Make sure **BlazorSample.Server** is set as startup project and press F5. 8. Once the web application starts, show the various pages of the application, like Counter and Fetch Data. Interact with them, to demonstrate that everything is running client side. 9. Go back to Visual Studio 2019 and briefly show the code of the **Counter.razor** and **FetchData.razor** files in the **Pages** folder. Highlight how there’s no JavaScript, all the logic is C#. 10. As a final proof, press F12 in Edge to open the Developer tools and move to the **Network** tab. 11. Reload the page by pressing CTRL-R 12. Show to the audience how the web application is not loading only HTML, CSS and JavaScript files, but also .dll and .wasm files: - Call out specifically **mono.wasm**, which is the web assembly implementation of Mono leveraged by Blazor. - - Call out specifically **BlazorGridSample.Client.dll**, which is the application built in Visual Studio. + - Call out specifically **BlazorSample.Client.dll**, which is the application built in Visual Studio. ![](Images/DeveloperTools.png) @@ -40,7 +40,7 @@ 19. Open the **FetchData.razor** file under **Pages** and show to the audience how the table is manually built using a foreach loop on the weather forecasts collection. 20. Now right click on the solution in Visual Studio and choose **Add -> Existing project**. 21. Look for the **BlazorGridComponent.csproj** file inside the folder **01-Blazor\01-Start\BlazorGridComponent** and select it -22. Now right click on the **BlazorGridSample.Client** project and choose **Add reference**. +22. Now right click on the **BlazorSample.Client** project and choose **Add reference**. 23. Choose **Projects -> Solution** and select the **BlazorGridComponent** project you have just added. 24. Now go back to the **FetchData.razor** file in the **Pages** folder 25. Add, at the top of the file, the following statement: From 83274464155c4ab0ed4c69f7cf1dc02e29da2350 Mon Sep 17 00:00:00 2001 From: Christian Nagel Date: Sun, 23 Jun 2019 20:42:32 +0200 Subject: [PATCH 6/9] rename Microsoft.Extensions.Hosting.Windows to Microsoft.Extensions.Hosting.WindowsServices --- Sessions/aspNet/03-Orders/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sessions/aspNet/03-Orders/README.md b/Sessions/aspNet/03-Orders/README.md index e62c50c..3585111 100644 --- a/Sessions/aspNet/03-Orders/README.md +++ b/Sessions/aspNet/03-Orders/README.md @@ -95,7 +95,7 @@ The worker will retrieve the full order, it will change its status and then it w 26. Now go back to Visual Studio and stop the debugger. 27. As last step of the demo, let's highlight the flexibility of the solution. Let's say, for example, that we want to run this application on a Windows server, with the worker running as a Windows service. 28. Right click on the **BlazorInsider.Worker** project and choose **Manage NuGet Packages**. -29. Show to the audience that the project includes a NuGet package called **Microsoft.Extensions.Hosting.Windows**, which enables the required features to expose the worker as a Windows Service. +29. Show to the audience that the project includes a NuGet package called **Microsoft.Extensions.Hosting.WindowsServices**, which enables the required features to expose the worker as a Windows Service. 30. Now double click on the **Program.cs** file. Add **UseWindowService()** in the **CreateHostBuilder()** method. This is how it should look like. ```csharp From 665871d4e58c299b4548d0d450acf5a27e9dc9f3 Mon Sep 17 00:00:00 2001 From: Christian Nagel Date: Sun, 23 Jun 2019 21:07:20 +0200 Subject: [PATCH 7/9] preview 6 updates --- .../01-Start/BlazorGridComponent/BlazorGrid.razor | 13 +++++++------ .../BlazorGridComponent/BlazorGridComponent.csproj | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Sessions/aspNet/01-Blazor/01-Start/BlazorGridComponent/BlazorGrid.razor b/Sessions/aspNet/01-Blazor/01-Start/BlazorGridComponent/BlazorGrid.razor index d27f801..c5a41f9 100644 --- a/Sessions/aspNet/01-Blazor/01-Start/BlazorGridComponent/BlazorGrid.razor +++ b/Sessions/aspNet/01-Blazor/01-Start/BlazorGridComponent/BlazorGrid.razor @@ -13,8 +13,8 @@ -@functions { +@code { int totalPages; int curPage; int pagerSize; @@ -65,7 +65,7 @@ IEnumerable ItemList { get; set; } - protected override async Task OnInitAsync() + protected override Task OnInitAsync() { pagerSize = 5; curPage = 1; @@ -74,6 +74,7 @@ totalPages = (int)Math.Ceiling(Items.Count() / (decimal)PageSize); SetPagerSize("forward"); + return Task.CompletedTask; } public void updateList(int currentPage) diff --git a/Sessions/aspNet/01-Blazor/01-Start/BlazorGridComponent/BlazorGridComponent.csproj b/Sessions/aspNet/01-Blazor/01-Start/BlazorGridComponent/BlazorGridComponent.csproj index e587c1f..4a15bec 100644 --- a/Sessions/aspNet/01-Blazor/01-Start/BlazorGridComponent/BlazorGridComponent.csproj +++ b/Sessions/aspNet/01-Blazor/01-Start/BlazorGridComponent/BlazorGridComponent.csproj @@ -27,9 +27,9 @@ - - - + + + From 87aaa9d9025801c4d04f2ee9dbf47d102a509c98 Mon Sep 17 00:00:00 2001 From: Christian Nagel Date: Sun, 23 Jun 2019 21:19:55 +0200 Subject: [PATCH 8/9] preview 6 updates --- .../BlazorGridComponent/BlazorGrid.razor | 13 ++--- .../BlazorGridComponent.csproj | 6 +-- .../BlazorSample.Client/App.razor | 6 ++- .../BlazorSample.Client.csproj | 10 ++-- .../BlazorSample.Client/Pages/Counter.razor | 4 +- .../BlazorSample.Client/Pages/FetchData.razor | 2 +- .../BlazorSample.Client/Pages/Index.razor | 2 +- .../BlazorSample.Client/Shared/NavMenu.razor | 6 +-- .../Shared/SurveyPrompt.razor | 4 +- .../BlazorSample.Server.csproj | 8 +-- .../BlazorSample.Server/Startup.cs | 5 +- .../02-End/BlazorSample/BlazorSample.sln | 49 +++++++++---------- .../01-Blazor/02-End/BlazorSample/global.json | 2 +- 13 files changed, 55 insertions(+), 62 deletions(-) diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorGridComponent/BlazorGrid.razor b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorGridComponent/BlazorGrid.razor index d27f801..c5a41f9 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorGridComponent/BlazorGrid.razor +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorGridComponent/BlazorGrid.razor @@ -13,8 +13,8 @@ -@functions { +@code { int totalPages; int curPage; int pagerSize; @@ -65,7 +65,7 @@ IEnumerable ItemList { get; set; } - protected override async Task OnInitAsync() + protected override Task OnInitAsync() { pagerSize = 5; curPage = 1; @@ -74,6 +74,7 @@ totalPages = (int)Math.Ceiling(Items.Count() / (decimal)PageSize); SetPagerSize("forward"); + return Task.CompletedTask; } public void updateList(int currentPage) diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorGridComponent/BlazorGridComponent.csproj b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorGridComponent/BlazorGridComponent.csproj index e587c1f..4a15bec 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorGridComponent/BlazorGridComponent.csproj +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorGridComponent/BlazorGridComponent.csproj @@ -27,9 +27,9 @@ - - - + + + diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/App.razor b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/App.razor index 80fb778..eb5c93b 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/App.razor +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/App.razor @@ -1 +1,5 @@ - + + +

Sorry, there's nothing at this address.

+
+
diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/BlazorSample.Client.csproj b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/BlazorSample.Client.csproj index 1afb451..54cede3 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/BlazorSample.Client.csproj +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/BlazorSample.Client.csproj @@ -3,21 +3,17 @@ netstandard2.0 Exe - - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; - https://dotnet.myget.org/F/blazor-dev/api/v3/index.json; - 7.3 3.0 - - + + - + diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/Counter.razor b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/Counter.razor index 973af92..1360f9e 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/Counter.razor +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/Counter.razor @@ -4,9 +4,9 @@

Current count: @currentCount

- + -@functions { +@code { int currentCount = 0; void IncrementCount() diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/FetchData.razor b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/FetchData.razor index 9a4ef69..e0b512d 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/FetchData.razor +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/FetchData.razor @@ -29,7 +29,7 @@ else } -@functions { +@code { WeatherForecast[] forecasts; protected override async Task OnInitAsync() diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/Index.razor b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/Index.razor index 79ec67d..7af3e86 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/Index.razor +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Pages/Index.razor @@ -6,4 +6,4 @@ Welcome to your new app. - \ No newline at end of file + diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Shared/NavMenu.razor b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Shared/NavMenu.razor index 193e53c..fa1912e 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Shared/NavMenu.razor +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Shared/NavMenu.razor @@ -1,11 +1,11 @@  -
+
-@functions { +@code { bool collapseNavMenu = true; string NavMenuCssClass => collapseNavMenu ? "collapse" : null; diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Shared/SurveyPrompt.razor b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Shared/SurveyPrompt.razor index 1db3c13..a126a15 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Shared/SurveyPrompt.razor +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Client/Shared/SurveyPrompt.razor @@ -4,12 +4,12 @@ Please take our - brief survey + brief survey and tell us what you think.
-@functions { +@code { // Demonstrates how a parent component can supply parameters [Parameter] string Title { get; set; } } diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Server/BlazorSample.Server.csproj b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Server/BlazorSample.Server.csproj index 20a6eaf..665a511 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Server/BlazorSample.Server.csproj +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Server/BlazorSample.Server.csproj @@ -2,16 +2,12 @@ netcoreapp3.0 - - https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json; - https://dotnet.myget.org/F/blazor-dev/api/v3/index.json; - 7.3 - - + + diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Server/Startup.cs b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Server/Startup.cs index cb6ed2d..00d64fa 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Server/Startup.cs +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.Server/Startup.cs @@ -33,14 +33,15 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseBlazorDebugging(); } + app.UseClientSideBlazorFiles(); + app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapDefaultControllerRoute(); + endpoints.MapFallbackToClientSideBlazor("index.html"); }); - - app.UseBlazor(); } } } diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.sln b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.sln index 15f87de..70143a0 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.sln +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/BlazorSample.sln @@ -1,20 +1,15 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 -VisualStudioVersion = 16.0.28902.138 +VisualStudioVersion = 16.0.29006.145 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorSample.Server", "BlazorSample.Server\BlazorSample.Server.csproj", "{2A7ADE86-30D2-434A-9DE7-FD0005BF0804}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorSample.Server", "BlazorSample.Server\BlazorSample.Server.csproj", "{AC34EC65-5EC0-4C65-AFC0-A90E6ED0B775}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorSample.Client", "BlazorSample.Client\BlazorSample.Client.csproj", "{C83C3D00-C2CF-4C29-BBFC-AE068F1AB189}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorSample.Client", "BlazorSample.Client\BlazorSample.Client.csproj", "{B94D06D0-A340-4EE1-BB0D-55A9A34D7166}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorSample.Shared", "BlazorSample.Shared\BlazorSample.Shared.csproj", "{D586CEA9-D5C8-4E83-A055-56A4AD0B4B5A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorSample.Shared", "BlazorSample.Shared\BlazorSample.Shared.csproj", "{60C4F7DC-DD42-483B-9F72-70DB6E77B7F7}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorGridComponent", "BlazorGridComponent\BlazorGridComponent.csproj", "{1CC4B0C3-1C17-4408-B93F-D151123783EF}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{4B338735-B7CC-463A-9144-356B8B9EBB65}" - ProjectSection(SolutionItems) = preProject - global.json = global.json - EndProjectSection +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorGridComponent", "..\..\01-Start\BlazorGridComponent\BlazorGridComponent.csproj", "{E6C0666E-C04A-4715-BD23-120282430D13}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -22,27 +17,27 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2A7ADE86-30D2-434A-9DE7-FD0005BF0804}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2A7ADE86-30D2-434A-9DE7-FD0005BF0804}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2A7ADE86-30D2-434A-9DE7-FD0005BF0804}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2A7ADE86-30D2-434A-9DE7-FD0005BF0804}.Release|Any CPU.Build.0 = Release|Any CPU - {C83C3D00-C2CF-4C29-BBFC-AE068F1AB189}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C83C3D00-C2CF-4C29-BBFC-AE068F1AB189}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C83C3D00-C2CF-4C29-BBFC-AE068F1AB189}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C83C3D00-C2CF-4C29-BBFC-AE068F1AB189}.Release|Any CPU.Build.0 = Release|Any CPU - {D586CEA9-D5C8-4E83-A055-56A4AD0B4B5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D586CEA9-D5C8-4E83-A055-56A4AD0B4B5A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D586CEA9-D5C8-4E83-A055-56A4AD0B4B5A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D586CEA9-D5C8-4E83-A055-56A4AD0B4B5A}.Release|Any CPU.Build.0 = Release|Any CPU - {1CC4B0C3-1C17-4408-B93F-D151123783EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1CC4B0C3-1C17-4408-B93F-D151123783EF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1CC4B0C3-1C17-4408-B93F-D151123783EF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1CC4B0C3-1C17-4408-B93F-D151123783EF}.Release|Any CPU.Build.0 = Release|Any CPU + {AC34EC65-5EC0-4C65-AFC0-A90E6ED0B775}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC34EC65-5EC0-4C65-AFC0-A90E6ED0B775}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC34EC65-5EC0-4C65-AFC0-A90E6ED0B775}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC34EC65-5EC0-4C65-AFC0-A90E6ED0B775}.Release|Any CPU.Build.0 = Release|Any CPU + {B94D06D0-A340-4EE1-BB0D-55A9A34D7166}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B94D06D0-A340-4EE1-BB0D-55A9A34D7166}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B94D06D0-A340-4EE1-BB0D-55A9A34D7166}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B94D06D0-A340-4EE1-BB0D-55A9A34D7166}.Release|Any CPU.Build.0 = Release|Any CPU + {60C4F7DC-DD42-483B-9F72-70DB6E77B7F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60C4F7DC-DD42-483B-9F72-70DB6E77B7F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60C4F7DC-DD42-483B-9F72-70DB6E77B7F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60C4F7DC-DD42-483B-9F72-70DB6E77B7F7}.Release|Any CPU.Build.0 = Release|Any CPU + {E6C0666E-C04A-4715-BD23-120282430D13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E6C0666E-C04A-4715-BD23-120282430D13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E6C0666E-C04A-4715-BD23-120282430D13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E6C0666E-C04A-4715-BD23-120282430D13}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {21081A8F-7E54-4128-9759-EF6C79573B84} + SolutionGuid = {27917031-292E-410B-B0B2-2D916BED4090} EndGlobalSection EndGlobal diff --git a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/global.json b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/global.json index ccc5beb..3d9fdb9 100644 --- a/Sessions/aspNet/01-Blazor/02-End/BlazorSample/global.json +++ b/Sessions/aspNet/01-Blazor/02-End/BlazorSample/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "3.0.100-preview5-011568" + "version": "3.0.100-preview6-012264" } } \ No newline at end of file From a9a277f29dd03eb83360769d9db57261d6ddd8de Mon Sep 17 00:00:00 2001 From: Christian Nagel Date: Mon, 24 Jun 2019 08:52:10 +0200 Subject: [PATCH 9/9] worker sample with preview 6 --- .../02-Worker/WorkerSample/WorkerSample.sln | 19 +++++++------------ .../WorkerSample/WorkerSample/Program.cs | 2 +- .../WorkerSample/WorkerSample.csproj | 4 ++-- .../aspNet/02-Worker/WorkerSample/global.json | 4 ++-- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample.sln b/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample.sln index dabe170..6f6b453 100644 --- a/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample.sln +++ b/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample.sln @@ -1,14 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 -VisualStudioVersion = 16.0.28902.138 +VisualStudioVersion = 16.0.29006.145 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkerSample", "WorkerSample\WorkerSample.csproj", "{2320B3DB-8634-40B8-83A7-9C8B6D79CB6A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{8ABE280E-2C06-4FC1-AF63-D97497006C43}" - ProjectSection(SolutionItems) = preProject - global.json = global.json - EndProjectSection +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkerSample", "WorkerSample\WorkerSample.csproj", "{E44CC2E5-8DDA-456C-8DAC-43A0B359B904}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -16,15 +11,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2320B3DB-8634-40B8-83A7-9C8B6D79CB6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2320B3DB-8634-40B8-83A7-9C8B6D79CB6A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2320B3DB-8634-40B8-83A7-9C8B6D79CB6A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2320B3DB-8634-40B8-83A7-9C8B6D79CB6A}.Release|Any CPU.Build.0 = Release|Any CPU + {E44CC2E5-8DDA-456C-8DAC-43A0B359B904}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E44CC2E5-8DDA-456C-8DAC-43A0B359B904}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E44CC2E5-8DDA-456C-8DAC-43A0B359B904}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E44CC2E5-8DDA-456C-8DAC-43A0B359B904}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {BC0FF1B1-2CB4-44F9-83AF-AA96E218AC7A} + SolutionGuid = {98B1F38C-B456-4AE0-AC30-DC806C9E2E78} EndGlobalSection EndGlobal diff --git a/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample/Program.cs b/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample/Program.cs index edbe697..c099ec3 100644 --- a/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample/Program.cs +++ b/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample/Program.cs @@ -16,7 +16,7 @@ public static void Main(string[] args) public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureServices(services => + .ConfigureServices((hostContext, services) => { services.AddHostedService(); }); diff --git a/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample/WorkerSample.csproj b/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample/WorkerSample.csproj index 5544a14..4f91798 100644 --- a/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample/WorkerSample.csproj +++ b/Sessions/aspNet/02-Worker/WorkerSample/WorkerSample/WorkerSample.csproj @@ -2,10 +2,10 @@ netcoreapp3.0 - dotnet-WorkerSample-99D96554-8450-4A9E-BB4A-F50BD1A09CB8 + dotnet-WorkerSample-B66A93C6-14E8-4A96-BBBE-E8882DB3E666 - + diff --git a/Sessions/aspNet/02-Worker/WorkerSample/global.json b/Sessions/aspNet/02-Worker/WorkerSample/global.json index ccc5beb..f463b50 100644 --- a/Sessions/aspNet/02-Worker/WorkerSample/global.json +++ b/Sessions/aspNet/02-Worker/WorkerSample/global.json @@ -1,5 +1,5 @@ -{ +{ "sdk": { - "version": "3.0.100-preview5-011568" + "version": "3.0.100-preview6-012264" } } \ No newline at end of file