<<

.NET Core, UWP, NuGet

INNOVATION 2.0

■ .NET Core ■ .NET Standard ■ UWP ■ NuGet Packages ■ Future -> .NET Core 3 .NET Future how sees it

■ Today ■ various tech stacks

■ Future ■ one Standard

https://appdevelopermagazine.com/looking-at-the-future-of-.net/ School of Engineering © K. Rege, ZHAW 2 von 82 .NET Framework Evolution

■ The .NET Framework library has evolved Project during the years ■ Goal: Run Microsoft .NET applications cross-platform ■ Better development tools to developers. ■ Mono can be run on many platforms ■ Android, most Linux distributions, ■ BSD, macOS, Windows, Solaris, and even some game consoles such as PlayStation 3, Wii, and 360. ■ Current status 21. Dec 2018 ■ .NET 4.7.2 is supported .NET 1.NET 2 .NET

School of Engineering © K. Rege, ZHAW 4 von 82

■ Xamarin is a Microsoft-owned San Francisco-based company ■ Founded in May 2011 by the engineers that created Mono ■ Xamarin library is based on Mono ■ Xamarin.Forms using # and XAML that is multi platform ■ Xamarin is a technology that allows to develop native apps for multiple platforms ■ Using a single C# codebase and .Net. ■ common code can be shared and reused, allowing to reduce the codebase . ■ Mono and the .Net Framework are not totally compatible to Xamarin ■ Microsoft has defined a cross platform ".Net Standard" (later)

■ but this .Net Standard does not provide a common UI library - yet

School of Engineering © K. Rege, ZHAW 5 von 82 What about the UI

■ There is a different UI library on each platform

■ in the .Net Ecosystem and no standard one. ■ On Windows, we find WPF (Windows Presentation Foundation) and WinForms, ■ On Linux and macOS (and also Windows) we have GtkSharp.

■ Xamarin.Forms (XAML based) ■ iOS, Android, UWP and macOS

School of Engineering © K. Rege, ZHAW 6 von 82 Class Library Variants VS 17

■ Build new Class Library Project ■ .NET Standard ■ runs on any standard compatible framework ■ such as .NET Core, .NET Framework, Mono/Xamarin ■ + the number of Apps that will be compatible ■ - API area compatible to your library ■ .NET Framework ■ uses the full .NET 4.x Framework classes ■ .NET Core ■ uses the Core Framework classes ■ + increase the API surface area your library ■ - only .NET Core Apps are compatible ■ Legacy Portable ■ target a very specific subset of .NET implem. ■ strongly discourage their use in new application ■ Universal Windows ■ target a very UWP specific implem. Subset ■ + the number of Apps that will be compatible

School of Engineering © K. Rege, ZHAW 7 von 82 School of Engineering © K. Rege, ZHAW 8 von 82 .NET Core

■ Is a new cross-platform Implementation of .NET Libraries ■ Elimination of windows only features (e.g. Registry, Forms, WPF)

School of Engineering © K. Rege, ZHAW 9 von 82 Benefits of .NET Core

■ .NET Core (codename .NET vNext) ■ first introduced in 2014 ■ Open Source ■ The main benefits are:

School of Engineering © K. Rege, ZHAW 10 von 82 … Benefits of .NET Core

■ Compatibility: ■ .NET Core: provides a portable subset of the .NET Framework

■ Class Libraries: CoreFX ■ smaller footprint than

■ Performance and Scalability: ■ NET Core: enhance the performance and scalability due to wider platform support

■ Deployment Options: ■ .NET Framework: Internet Information Server only ■ .NET Core: directly in the cloud or self-host the application by creating own hosting process. ■ Framework -Dependent Deployment (FDD) ■ .NET Core SDK has to be installed on machine beforehand ■ Self-Contained Deployment (SCD) ■ .NET Core CLR and class library as part of application package

School of Engineering © K. Rege, ZHAW 11 von 82 When to Use .NET Core

■ Use .NET Core for your server application when: ■ You have cross-platform needs. ■ You are targeting microservices. ■ You are using Docker containers. ■ You need high-performance and scalable systems. ■ You need side-by-side .NET versions per application.

■ Use .NET Framework for your server application when: ■ Your app currently uses .NET Framework (recommendation is to extend instead of migrating). ■ Your app uses third-party .NET libraries or NuGet packages not available for .NET Core. ■ Your app uses .NET technologies that aren't available for .NET Core. ■ e.g. Registry,Win Forms ■ Your app uses a platform that doesn’t support .NET Core.

https://docs.microsoft.com/en-us/dotnet/standard/choosing-core-framework-server

School of Engineering © K. Rege, ZHAW 12 von 82 .NET Framework vs .NET Core

■ Application Model ■ .NET Framework: , ASP.NET, and Windows Presentation Foundation (WPF). ■ .NET Core: ASP.NET Core and Windows Universal Apps.

■ .NET Standard: ■ formerly called "Unified BCL" ■ .NET Framework: Each version of .NET Framework uses a specific version ■ For instance, .NET Framework 4.6 implemented the .NET 1.3 ■ NET Core 1.0 implements Standard Version 1.6

■ ASP.NET: ■ .NET Core: is a complete rewrite of the existing ASP.NET Framework ■ To be highly modular, with a number of best practices built in (e.g. dependency injection). ■ No longer is there a web.config or global.asax, ■ In their place are startup.cs and project. (among others).

School of Engineering © K. Rege, ZHAW 13 von 82 RyuJIT

■ New JIT Compiler for version 2.0 ■ more efficient native ■ is 100% faster than previous version ■ generated 30% faster code ■ supports X64 and architectures

■ Profile guided optimization ■ records information about code ■ this information is used for optimize code generation

■ Similar to 's Hotspot approach but separated optimization step

School of Engineering © K. Rege, ZHAW 14 von 82 Core Microservices Architecture

■ Azure App Service ■ For stateless microservices. ■ -> Fowler GoTo 2014 Talk https://www.youtube.com/watch?v=wgdBVIX9ifA

■ Based on Docker ■ Can be hosted in your own Linux or Windows infrastructure, ■ A cloud service such as Azure Container Service.

■ Azure Service Fabric ■ for large and complex microservice systems

■ Azure Kubernetes Service (AKS) https://azure.microsoft.com/en-us/services/kubernetes-service/ https://docs.microsoft.com/en-us/azure/aks/

School of Engineering © K. Rege, ZHAW 15 von 82 Core Hello World

School of Engineering © K. Rege, ZHAW 16 von 82 Hello World Application with VS

■ File > New > Project -> Console App (.NET Core)

https://docs.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio

School of Engineering © K. Rege, ZHAW 17 von 82 … Hello World Application Build and Run

■ Application template automatically defines a class, Program, with a single method, Main

■ To keep Console Window open add to generated main Method

Console.Write("PressConsole.Write("Press anyany keykey toto continue...");continue..."); Console.ReadKey(true);Console.ReadKey(true); ■ And press start

School of Engineering © K. Rege, ZHAW 18 von 82 Hello World Application with CLI

■ Simply start a new console and create a new directory, type > dotnet new console > dotnet run Hello World!

■ Generated files: Exe netcoreapp2.1

using System;

namespace temp { class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); } } }

School of Engineering © K. Rege, ZHAW 19 von 82 … DOTNET CLI commands

■ CLI command structure consists of ■ the driver ("dotnet"), ■ the command (or "verb"), ■ and possibly command arguments and options.

■ Example greate, build and run

https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet?tabs=netcore21 School of Engineering © K. Rege, ZHAW 20 von 82 Development Environment

■ Visual Studio ■ By Microsoft ■ Supported on Windows and Mac: ■ Visual Studio provides an Integrated Development Environment (IDE) for Windows and macOS. ■ ReSharper from JetBrains

■ Rider ■ By JetBrains ■ Cross-platform .NET IDE based on the IntelliJ platform and ReSharper.

■ By Microsoft but Open Source ■ Runs on Mac, Linux, and Windows ■ Based on Electron based on and Node.js ■ Integration via .NET Core command-line interface (CLI) tools ■ i.e. Notepad++ with memory footprint of VS

■ Works with any other Editors Notepad++, Sublime, , and Vi ■ Integration via .NET Core command-line interface (CLI) tools

School of Engineering © K. Rege, ZHAW 21 von 82 Not Yet Available for .NET Core 2.2

■ ASP.NET Web Forms applications ■ ASP.NET Web Pages applications ■ WPF and WinForms Applications

■ WCF Services Implementation ■ There’s a WCF-Client library to consume WCF services from .NET Core

■ Workflow-related services ■ Windows Workflow Foundation (WF), Workflow Services ■ ADO.NET Data Services

■ Blog: what should become part of .NET Core https://github.com/dotnet/corefx/issues?q=is%3Aopen+is%3Aissue+label%3Aport-to-core

School of Engineering © K. Rege, ZHAW 22 von 82 .NET Standard

School of Engineering © K. Rege, ZHAW 23 von 82 .NET Standard

■ Each .NET implementation version advertises the highest .NET Standard version it supports

School of Engineering © K. Rege, ZHAW 24 von 82 UWP

School of Engineering © K. Rege, ZHAW 25 von 82 The Convergence Journey

School of Engineering © K. Rege, ZHAW 26 von 82 One Window Platform

School of Engineering © K. Rege, ZHAW 27 von 82 Features of UWP Apps

■ Secure: ■ UWP apps declare which device resources and data they access. ■ The user must authorize that access. ■ Able to use a common API on all devices that run . ■ Able to use device specific capabilities and adapt the UI to different device screen sizes, resolutions, and DPI. ■ Available from the ■ on all devices ■ or only those that you specify that run on Windows 10. ■ Able to be installed and uninstalled ■ without risk to the machine or incurring "machine rot". ■ Engaging: use live tiles, push notifications, and user activities that interact with Windows Timeline and Cortana's Pick Up Where I Left Off ■ Programmable in C#, C++, , and JavaScript. For UI, use XAML, HTML, or DirectX.

School of Engineering © K. Rege, ZHAW 28 von 82 Universal Windows Platform

■ Run and License one Windows on different Platforms

School of Engineering © K. Rege, ZHAW 29 von 82 SKU Stock Keeping Unit

■ In the field of inventory management ■ A stock keeping unit is a distinct type of item for sale and licensing

■ The process of changing the installed SKU of Windows, ■ e.g between Windows Pro and Windows Enterprise

https://blogs.technet.microsoft.com/mniehaus/2017/10/03/easily-switch-from-windows-10-enterprise-to-windows-10-education/

School of Engineering © K. Rege, ZHAW 30 von 82 UWP in the Context

■ UWP in the Context of Microsoft's technology stack

School of Engineering © K. Rege, ZHAW 31 von 82 Universal Windows Platform

■ Goals of the Windows UWP Platform

School of Engineering © K. Rege, ZHAW 32 von 82 Universal Windows Platform

■ A single, guaranteed (same) API Surface ■ The same on all devices

School of Engineering © K. Rege, ZHAW 33 von 82 API Reference for UWP Apps and

■ Common API that you can use to deliver Apps ■ All devices that run Windows 10. https://docs.microsoft.com/en-us/uwp/

School of Engineering © K. Rege, ZHAW 34 von 82 A (hell) Lot of APIs

School of Engineering © K. Rege, ZHAW 35 von 82 Platform Extensions

School of Engineering © K. Rege, ZHAW 36 von 82 Test Capabilities at Runtime

School of Engineering © K. Rege, ZHAW 37 von 82 GUI design for UWP https://docs.microsoft.com/en-us/windows/uwp/design/basics/design-and-ui-intro

Effective Pixels Size and Scaling ■ System normalize the way UI elements display on the screen ■ Taking account viewing distance and screen density ■ The scaling algorithm ensures that a 24 px font on 10 feet away is just as legible to the user as a 24 px font on 5"

■ UWP scales across a range of devices with scaling plateaus of ■ 100%, 125%, 150%, 175%, 200%, 225%, 250%, 300%, 350%, and 400%.

■ However: ■ W10 scaling is different than previous OSs to support also smaller mobile devices ■ Automatic Scaling may result in blurry fonts and/or icons ■ Principle Question: Application or OS Scaling for High DPI ■ Older Programs may not be "High DPI" aware resulting in unusable small Icons,Buttons ■ e.g. Adobe see:http://www.danantonielli.com/adobe-app-scaling-on-high-dpi-displays-fix/

School of Engineering © K. Rege, ZHAW 38 von 82 … GUI design for UWP

Page Layout ■ Most pages follow a common structure to provide consistency ■ users can easily navigate between and within pages of your app. ■ Pages typically contain three types of UI elements: ■ Navigation elements help users choose the content they want to display. ■ Command elements initiate actions, such as manipulating, saving, or sharing content. ■ Content elements display the app's content.

■ The arrangement of the UI elements may differ for e.g. small mobile devices https://docs.microsoft.com/en-us/windows/uwp/design/layout/page-layout School of Engineering © K. Rege, ZHAW 39 von 82 … GUI design for UWP

Adaptive Layouts ■ Different Layouts according physical dimensions ■ 1. Define so called " points" when different layout should be triggered 0 641 all size 0 .. 640 1008 ■ 2. Define the Triggers for these layouts

School of Engineering © K. Rege, ZHAW 40 von 82 … GUI design for UWP

■ 3. Define Properties of this Layout by Setters

...

...

■ -> see WPF lecture "Styles"

School of Engineering © K. Rege, ZHAW 41 von 82 … GUI design for UWP

■ Color ■ Use color meaningfully ■ Color is personal ■ indicate interactivity ■ Color is cultural ■ Color merely as additional criterion 8% are partially color blind (red-green) ■ Typograph ■ default font for UWP apps -> Segoe UI

■ Icons ■ Use predefined icons when possible ■ Segoe MDL2 Assets font or SVG ■ no Bitmaps ■ XAML Theme Resources are tailored for the "Light" and "Dark" themes

School of Engineering © K. Rege, ZHAW 42 von 82 … GUI design for UWP

Common Controls ■ a set that are guaranteed to work well on all Windows-powered devices

https://docs.microsoft.com/en-us/windows/uwp/design/fluent-design-system/index School of Engineering © K. Rege, ZHAW 43 von 82 NuGet Packa ges

School of Engineering © K. Rege, ZHAW 44 von 82 NuGet

■ NuGet, the open source ; it's goals are ■ Share functionality between projects ■ Publish packages ■ Improve and automate parts of the development process ■ Versioning of packages

■ Tooling ■ Visual Studio extension ■ Standalone Console Program

■ Server ■ Publicly available package servers such as .org . ■ Microsoft itself uses NuGet extensively for the provision of important components ■ Many Visual Studio project templates include references to NuGet packages, ■ even parts of the .NET Framework itself are now shipped that way. ■ there are 147,456 packages (25. 3. 2019) https://entwickler.de/online/paeckchen-packen-mit-nuget-und-tfs-159983.

School of Engineering © K. Rege, ZHAW 45 von 82 NuGet - Installation

■ Installed with VS 2017 in ■ C:\\\Editor\Data\Tools -> Add to Path if CLI used

■ Or get it online (Windows) ■ https://www.nuget.org/downloads

■ Other Platforms (Linux/Mac) ■ https://docs.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference

School of Engineering © K. Rege, ZHAW 46 von 82 Consumtion of a NuGet Package

School of Engineering © K. Rege, ZHAW 47 von 82 Use of NuGet packages

■ The package management is divided into different areas: ■ Browse: ■ All packages that are available for installation are displayed here. ■ Section is divided into different package servers.

■ Installed: ■ All packages that are already installed ■ Incidentally, the packages can also be uninstalled in this section.

■ Updates: ■ Displays packages that are already installed and available for updates.

■ Tools -> Options ■ other alternative sources such as myget.org ■ or your own local sources

School of Engineering © K. Rege, ZHAW 48 von 82 … Use of NuGet packages

■ NuGet automatically creates a file named packages.config within the project or add reference section in project.assets.json file (.NET Core)

■ In the configuration file, NuGet remembers which packages are installed in which version in the corresponding project ■ The packages are then downloaded from the corresponding server and stored locally ■ In addition, ■ it is possible to manipulate configuration files and insert additional entries ■ Another advantage is that dependencies to other packages can be defined ■ when installing a package these dependencies are detected and the corresponding packages are automatically installed.

School of Engineering © K. Rege, ZHAW 49 von 82 Consumption of NuGet Package inside VS 17

■ Package Manager UI ■ Solution Explorer, right-click References and choose Manage NuGet Packages.

■ Choose "nuget.org" as the Package source, select the Browse tab, search for e.g. Newtonsoft.Json, select that package in the list, and select Install:

■ Accept any license prompts. ■ i.e. sell your soul to Microsoft

■ If prompted to select a package management format, select PackageReference in project file:

https://docs.microsoft.com/en-us/nuget/quickstart/install-and-use-a-package-in-visual-studio

School of Engineering © K. Rege, ZHAW 50 von 82 Versioning/Updating of packages

■ Advantages of using NuGet is that the Package Manager comes with a versioning and updating mechanism.

■ The reference in the project is always set by NuGet to the version specified in the packages.config

■ The Package Manager displays all packages for which there is a newer version. ■ These can be updated accordingly from there. ■ The new version of the package is then downloaded to the packages folder and the reference to the new version is changed.

■ Also dependencies and missing packages may be added automatically

School of Engineering © K. Rege, ZHAW 51 von 82 Package Manager CLI

■ Select the VS Tools > NuGet Package Manager > Package Manager Console menu command. ■ Check that the Default project drop- down list shows the project into which you want to install the package. ■ If you have a single project in the solution, it is already selected.

■ a Newtonsoft.Json.12.0.1 directory Enter the command Install-Package e.g. a Newtonsoft.Json.12.0.1 directory will be created with the .nupkg Newtonsoft.Json (see Install-Package). will be created with the .nupkg ■ Errors typically indicate that the package isn't cd \your_project_folder\ compatible with the project's target framework. nuget.exe Install Newtonsoft.Json -Version 12.0.1 ■ The CLI nuget install command does not modify project files or the packages.config file ■ Entries must be managed manually.

School of Engineering © K. Rege, ZHAW 52 von 82 Package Consumption Workflow

■ consuming a package follows the general workflow.

■ The NuGet CLI ■ rem: install command does not modify project files or the packages.config file ■ entries must be added manually to project

School of Engineering © K. Rege, ZHAW 53 von 82 Creation of a NuGet Package

School of Engineering © K. Rege, ZHAW 54 von 82 Create a package using VS 17

■ Create a class library project ■ Configure package properties ■ Project > Properties menu command, then select the Package tab ■ Give your package a unique identifier and fill out any other desired properties. ■ For a description of the different properties, see .nuspec file reference. All of the properties here go into the .nuspec that Visual Studio creates for the project.

https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-visual-studio

School of Engineering © K. Rege, ZHAW 55 von 82 … Create a package using VS 17

■ Set the configuration to Release. ■ Right click the project in Solution Explorer and select the Pack command:

■ Visual Studio builds the project and creates the .nupkg file.

School of Engineering © K. Rege, ZHAW 56 von 82 Create a package using CLI

Creating a .nuspec File in your project folder errlog.io 1.1.18 … …

■ add Picture is worth a thousand pull requests If your library uses any If your library uses any ■ Including a README.MD file packages, packages, ■ build your NuGet package cd \your_project_folder\ nuget.exe config -Set repositoryPath="\full-path-to-your-packages-folder\" nuget.exe pack -IncludeReferencedProjects -properties Configuration=Release

School of Engineering © K. Rege, ZHAW 57 von 82 …. Create a package using CLI

■ .Nuspec Example errlog.io 1.1.18 ErrLog.IO Error and Exception Logging Tool Matthew Proctor, Michael Sanders, Alastair Bateman kutamo https://errlog.io/terms https://errlog.io/docs/getting-started https://www.errlog.io/images/errlog_dark_logo.png false ErrLog.IO is an exception and error logging tool Bug fixes and performance improvements Copyright 2017 Kutamo Pty. Ltd. exceptions web http error logging

ErrLog.IO is an exception and error logging tool. stepstep by by step step tutorials tutorials https://www.wiliam.com.au/wiliam-blog/creating-a-nuget-package https://www.errlog.io/blogs/2017/12/creating-a-nuget-package

School of Engineering © K. Rege, ZHAW 58 von 82 Publish a NuGet Package

School of Engineering © K. Rege, ZHAW 59 von 82 Acquire your API key

■ Goto: https://www.nuget.org/ ■ Sign in or create an account if you don't have one already.

■ Acquire your API key ■ Select your user name (on the upper right), then select API Keys. ■ Select Create, provide a name for your key, select Select Scopes > Push. Under API Key, enter * for pattern, then select Create. (See below for more about scopes.) ■ Once the key is created, select Copy to retrieve the access key you need e.g. in the CLI:

School of Engineering © K. Rege, ZHAW 60 von 82 Publish your Package via HTML Page

■ Uploading a Package via Web Upload ■ You can simply upload your .nupkg file to via ■ https://www.nuget.org/packages/manage/upload

■ Nuget will open your package, read the .nuspec file, and publish your package all in a single step.

School of Engineering © K. Rege, ZHAW 61 von 82 … Publish your Package via HTML Page

■ Uploading a Package Manually ■ You can simply upload your .nupkg file to nuget by visiting https://www.nuget.org/packages/manage/upload

■ Nuget will open your package, read the .nuspec file, and publish your package

School of Engineering © K. Rege, ZHAW 62 von 82 Publish your Package via CLI

■ nuget.exe has the ability of uploading your package automatically - this means you can write a script to automatically build and deploy your package simply and without interaction.

■ In order to upload your package via nuget.exe, we need to set the API key. You can create an API key from within your account on Nuget.Org.

■ Once you've set the API Key, you can push your package nuget.exe config setApiKey aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee nuget.exe push [your-package-filename].nupkg -Source https://www.nuget.org/api/v2/package

■ This can/should be automated with Powershell in the build process

School of Engineering © K. Rege, ZHAW 63 von 82 School of Engineering © K. Rege, ZHAW 64 von 82 .NET Core 3 Preview 2 (31.1.2019)

■ Supported on VS 2019, VS for Mac and VS Code ■ Limitation in Preview 2 ■ Visual Designer for WinForms and WPF are not available ■ but there are workarounds ■ WinForms and WPF projects need to be created from CLI ■ dotnet new winforms and dotnet new wpf can be opened by vs 2019 afterwards

School of Engineering © K. Rege, ZHAW 65 von 82 .NET Core 3

■ Also supports for development of Desktop, IoT and AI applications

.NET.NET Core3 Core3 extensions extensions

https://www.youtube.com/watch?v=upVQEUc_KwU

School of Engineering © K. Rege, ZHAW 66 von 82 Desktop Improvements

School of Engineering © K. Rege, ZHAW 67 von 82 Why Windows Desktop on .NET Core

■ Deployment Flexibility ■ Side-by-side support ■ Machine global or app local framework ■ self-contained EXEs

■ Side-by-side of different Frameworks is better supported

■ Future MS Development is focused to .NET Core ■ New features will be added first in .NET Core ■ Performance Enhancements

■ The same arguments why you should abandon IE and change to Edge https://www.wired.com/story/microsoft-edge-browser-chromium-internet-explorer/

School of Engineering © K. Rege, ZHAW 68 von 82 Upgrade Path

School of Engineering © K. Rege, ZHAW 69 von 82 Migrating a WinForm or WPF app to Core

School of Engineering © K. Rege, ZHAW 70 von 82 Migrating a WinForm or WPF App to Core

■ Replace Project File with the following

■ If Missing Assemblies, e.g. Registry ■ Add Windows.Compatibility

■ Optionally: add Analyser Package to inspect project

School of Engineering © K. Rege, ZHAW 71 von 82 … 2nd Option Migrating an App to Core

■ Create New .NET Core Project (preview -> via Command Line)

> dotnet new winforms -o

School of Engineering © K. Rege, ZHAW 72 von 82 Introduction to

■ Runs in all browsers on the real .NET runtime with full support for .NET Standard. ■ Requires no plugins and no code transpilation, only open web standards ■ Native performance with WebAssembly ■ Easily interact with your existing JavaScript code https://docs.microsoft.com/en-us/aspnet/core/client-side/spa/blazor/index?view=aspnetcore-3.0 https://www.youtube.com/watch?v=PiJtEZYMxOc School of Engineering © K. Rege, ZHAW 73 von 82 ASP.NET Core 3.0 Razor Components (Blazer)

School of Engineering © K. Rege, ZHAW 74 von 82 Web Assembly

■ Mono .NET Runtime compiled to wasm ■ Can run "standard" CLR Code

School of Engineering © K. Rege, ZHAW 75 von 82 Razor Components Code

■ Similar Programming Model and L&F of native Forms Apps

■ Currently .NET Code is interpreted -> 10x slower than native ■ Mono Team works on WASM Compiler Backend for C# ■ native code performance in browser: http://radar.zhaw.ch/~rege/psp_hs18/Compiler_V2.pdf

School of Engineering © K. Rege, ZHAW 76 von 82 Fragen ?

School of Engineering © K. Rege, ZHAW 77 von 82 DOTNET CLI commands

■ The following commands can be passed to the dotnet program

add Add a package or reference to a .NET project. build Build a .NET project. build-server Interact with servers started by a build. clean Clean build outputs of a .NET project. help Show command line help. list List project references of a .NET project. migrate Migrate a project.json project to an MSBuild project. Run Microsoft Build Engine (MSBuild) commands. new Create a new .NET project or file. nuget Provides additional NuGet commands. pack Create a NuGet package. publish Publish a .NET project for deployment. remove Remove a package or reference from a .NET project. restore Restore dependencies specified in a .NET project. run Build and run a .NET project output. sln Modify Visual Studio solution files. store Store the specified assemblies in the runtime package store. test Run unit tests using the test runner specified in a .NET project. tool Install or manage tools that extend the .NET experience. vstest Run Microsoft Test Engine (VSTest) commands.

School of Engineering © K. Rege, ZHAW 78 von 82 … DOTNET CLI commands

■ Additional commands from bundled tools:

dev-certs Create and manage development certificates. ef Core command-line tools. sql-cache SQL Server cache command-line tools. user-secrets Manage development user secrets. watch Start a file watcher that runs a command when files change.

School of Engineering © K. Rege, ZHAW 79 von 82 NuGet Commands

School of Engineering © K. Rege, ZHAW 80 von 82 NuGet Secondary Commands

School of Engineering © K. Rege, ZHAW 81 von 82 .nuspec XML File Element

https://www.errlog.io/blogs/2017/12/creating-a-nuget-package

School of Engineering © K. Rege, ZHAW 82 von 82