Subscribe: Latest Microsoft Blogs
Added By: Feedage Forager Feedage Grade B rated
Language: English
azure database  azure  command  core  net core  net standard  net  new  project  standard  visual studio  visual  windows 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Latest Microsoft Blogs



Introducing ASP.NET Core 2.0 Preview 2

Wed, 28 Jun 2017 17:02:15 +0000

At Build 2017, we released an initial preview version of ASP.NET Core 2.0.  Over the last two months we have incorporated your feedback and added a number of new features.  We now have a Preview 2 version of the ASP.NET Core 2.0 framework and Visual Studio tools for you to try.  In this post, we... Read more

Use IServer from ASP.NET Core to create your own web server

Tue, 27 Jun 2017 22:55:58 GMT

Fanie Reynders uses the IServer interface from ASP.NET Core to create his own HTTP server.

Media Files:

WilderMinds' ASP.NET Core Snippets

Mon, 26 Jun 2017 22:51:32 GMT

Shawn Wildermuth's Wilder Minds shares a set of snippets for building ASP.NET Core projects in Visual Studio Code.

Media Files:

Exploring CQRS within the Brighter .NET open source project

Sun, 25 Jun 2017 09:49:00 GMT

There's a ton of cool new .NET Core open source projects lately, and I've very much enjoyed exploring this rapidly growing space. Today at lunch I was checking out a project called "Brighter." It's actually been around in the .NET space for many years and is in the process of moving to .NET Core for greater portability and performance. Brighter is a ".NET Command Dispatcher, with Command Processor features for QoS (like Timeout, Retry, and Circuit Breaker), and support for Task Queues" Whoa, that's a lot of cool and fancy words. What's it mean? The Brighter project is up on GitHub incudes a bunch of libraries and examples that you can pull in to support CQRS architectural styles in .NET. CQRS stands for Command Query Responsibility Segregation. As Martin Fowler says, "At its heart is the notion that you can use a different model to update information than the model you use to read information." The Query Model reads and the Command Model updates/validates. Greg Young gives the first example of CQRS here. If you are a visual learner, there's a video from late 2015 where Ian Cooper explains a lot of this a the London .NET User Group or an interview with Ian Cooper on Channel 9. Brighter also supports "Distributed Task Queues" which you can use to improve performance when you're using a query or integrating with microservices. When building distributed systems, Hello World is NOT the use case. BUT, it is a valid example in that it strips aside any business logic and shows you the basic structure and concepts. Let's say there's a command you want to send. The GreetingCommand. A command can be any write or "do this" type command.internal class GreetingCommand : Command{ public GreetingCommand(string name) :base(new Guid()) { Name = name; } public string Name { get; private set; }}Now let's say that something else will "handle" these commands. This is the DoIt() method. No where do we call Handle() ourselves. Similar to dependency injection, we won't be in the business of calling Handle() ourselves; the underlying framework will abstract that away.internal class GreetingCommandHandler : RequestHandler{ [RequestLogging(step: 1, timing: HandlerTiming.Before)] public override GreetingCommand Handle(GreetingCommand command) { Console.WriteLine("Hello {0}", command.Name); return base.Handle(command); }}We then register a factory that takes types and returns handlers. In a real system you'd use IoC (Inversion of Control) dependency injection for this mapping as well. Our Main() has a registry that we pass into a larger pipeline where we can set policy for processing commands. This pattern may feel familiar with "Builders" and "Handlers."private static void Main(string[] args){ var registry = new SubscriberRegistry(); registry.Register(); var builder = CommandProcessorBuilder.With() .Handlers(new HandlerConfiguration( subscriberRegistry: registry, handlerFactory: new SimpleHandlerFactory() )) .DefaultPolicy() .NoTaskQueues() .RequestContextFactory(new InMemoryRequestContextFactory()); var commandProcessor = builder.Build(); ...}Once we have a commandProcessor, we can Send commands to it easier and the work will get done. Again, how you ultimately make the commands is up to you.commandProcessor.Send(new GreetingCommand("HanselCQRS"));Methods within RequestHandlers can also have other behaviors associated with them, as in the case of "[RequestLogging] on the Handle() method above. You can add other stuff like Validation, Retries, or Circuit Breakers. The idea is that Brighter offers a pipeline of handlers that can all operate on a Command. The Celery Project is a similar project except written in Python. The Brighter project has stated they have lofty goals, intending to one day handle fault tolerance like Netflix's Hystrix project.One of the nicest aspects to Brighter [...]

Using ImageSharp to resize images in ASP.NET Core - a comparison with CoreCompat.System.Drawing

Fri, 23 Jun 2017 22:35:54 GMT

Andrew Lock crops and resizes images in an ASP.NET Core application using ImageSharp.

Media Files:

Testavior: A Happy Solution To Test Your ASP.NET Core Applications

Thu, 22 Jun 2017 22:32:33 GMT

Arnaud Auroux introduces Testavior, a lightweight solution to help the development of behavior tests for ASP.NET Core.

Media Files:

Introducing Azure Cosmos DB

Thu, 22 Jun 2017 21:00:00 GMT

Kirill Gavrylyuk stops by Azure Friday to talk Cosmos DB with Scott Hanselman. Watch quick overview of the industry's first globally distributed multi-model database service followed by a demo of moving an existing MongoDB app to Cosmos DB with a single config change.

For more information, see: Azure Cosmos DB.

(image) Kirill Gavrylyuk stops by Azure Friday to talk Cosmos DB with Scott Hanselman. Watch quick overview of the industry's first globally distributed multi-model database service followed by a demo of moving an existing MongoDB app to Cosmos DB with a single config change. For more information, see: Azure Cosmos DB. Follow @SHanselman Follow @KirillG_MSFT Follow @AzureFriday

Media Files:

Dynatrace supports monitoring of .NET Core applications

Wed, 21 Jun 2017 22:24:44 GMT

Christoph Neumüller explains how Dynatrace OneAgent can be used to capture monitoring data in the .NET Core process.

Media Files:

Solved: Surface Pro 3 USB Driver Issues with the Surface Diagnostic Toolkit

Wed, 21 Jun 2017 18:56:42 GMT

I've got a personal Surface Pro 3 that I like very much. It's worked great for years and I haven't had any issues with it. However, yesterday while installing a 3rd party USB device something got goofed around with the drivers and I ended up in this state. That "banged out" device in my Device Manager is the root Universal Serial Bus (USB) Controller for the Surface. That means everything  USB didn't work since everything USB hangs off that root device node. I know it's an Intel USB 3.0 xHCI Host Controller but I didn't want to go installing random Intel Drivers. I just wanted the Surface back the way it was, working, with the standard drivers. I tried the usual stuff like Uninstalling the Device and rebooting, hoping Windows would heal it but it didn't work. Because the main USB device was dead that meant my Surface Type Keyboard didn't work, my mouse didn't work, nothing. I had to do everything with the touchscreen. After a little poking around on Microsoft Support websites, a friend turned me onto the "Surface Tools for IT." These are the tools that IT Departments use when they are rolling out a bunch of Surfaces to an organization and they are regularly updated. In fact, these were updated just yesterday! There are a number of utilities you can check out but the most useful is the Surface Diagnostic Toolkit. It checks hardware and software versions and found a number of little drivers things wrong...and fixed them. It reset my USB Controller and put in the right driver and I'm back in business. This util was useful enough to me that I wish it had been installed by default on the Surface and plugged into the built-in Windows Troubleshooting feature. Sponsor: Seq is simple centralized logging, on your infrastructure, with great support for ASP.NET Core and Serilog. Version 4 adds integrated dashboards and alerts - check it out!© 2017 Scott Hanselman. All rights reserved.      [...]

High-performance .NET by example: Filtering bot traffic

Tue, 20 Jun 2017 08:12:24 GMT

Alexandr Nikitin filters bot traffic by user agent and tunes performance along the way.

Media Files:

Migrating from project.json to csproj using Visual Studio 2017

Mon, 19 Jun 2017 12:31:43 GMT

Steve Gordon moves a real world ASP.NET Core application using VS2015 project.json to VS2017 and csproj.

Media Files:

Get Solarized - Awesome command prompt colors for VS, VS Code, cmd, PowerShell, and more

Sat, 17 Jun 2017 00:22:29 GMT

I was on a call with my co-worker Maria today and she commented on how nice my command prompt in Windows looked. I told it was "Solarized" and then our conference call fell apart as we collected all kinds of fun info about how you can get Solarized in your favorite apps on Windows. Solarized is a sixteen color palette (eight monotones, eight accent colors) designed for use with terminal and gui applications. It's by Ethan Schoonover and it's spread all over the web. You can see screenshots and learn about it on GitHub. Solarized for your Windows Command Prompt (cmd, powershell, bash) By default when you right click and hit properties on a shortcut for a prompt like cmd, powershell, or bash, you'll get a dialog that looks like this. You'll see there's 16 colors, usually 8 colors on the left, and then the "light/intense/bold" version of each color on the right. I usually used Intense Terminal Green on black before Solarized. Those values (the defaults) are stored in the registry here HKEY_CURRENT_USER\Console Those defaults are used for NEW shortcuts or consoles that start afresh, via Windows+R. This won't change existing shortcuts you may already have created. There's a few ways to fix this. I've found the easiest manual way is to recreate the shortcuts. You can do this by just copy-pasting a shortcut and using the new one. However, there is talk of programmatically updating .lnk (Start Menu link files) with PowerShell. You'd just go to the location of each LNK file you want to change, then run Update-Link.ps1 YOURLINK.LNK "light|dark" and it'll load up the .lnk file using Windows APIs and save it with a new Color Table. I've started that work here and I'll PR the main repo if I can solve one issue - I can't get it to switch to Solarized Light, just Dark. It might be something wrong on my side. Please take a look if you're a Win32/PowerShell internals type. Here I went to where the Start Menu stores most of the LNK files. You can also search for an item in your start and right-click "Open File Location."pow Here's before and after with my Developer Command Prompt for Visual Studio 2015. NOTE: Once this is done, in cmd.exe you can also switch between light and dark with "color f6" or "color 01" which is nice for presentations. I'm not sure how to do this yet in PowerShell or Bash. Here is the palette after: For PowerShell there is also an extra-step you'll want to put into your Microsoft.PowerShell_profile.ps1 where you map things like Errors, Progress Bars, and Warnings internally in PowerShell. Be sure to read the instructions. Solarized in Visual Studio and Visual Studio Code As for Visual Studio and Visual Studio Code, they're far easier. You can just Ctrl-K then Ctrl-T in VSCode and pick Solarized. For Visual Studio (all versions) you can head over to @leddt's GitHub and download settings files for Solarized that you can then import info VS from Tools | Import and Export Settings. Sponsor: Big thanks to Raygun! Don't rely on your users to report the problems they experience. Automatically detect, diagnose and understand the root cause of errors, crashes and performance issues in your web and mobile apps. Learn more. © 2017 Scott Hanselman. All rights reserved.      [...]

Exploring GraphQL and creating a GraphQL endpoint in ASP.NET Core

Fri, 16 Jun 2017 10:39:50 GMT

Jürgen Gutsch creates a GraphQL endpoint in ASP.NET Core.

Media Files:

How to reference a .NET Core library in WinForms - Or, .NET Standard Explained

Fri, 16 Jun 2017 07:13:44 GMT

I got an interesting email today. The author said "I have a problem consuming a .net core class library in a winforms project and can't seem to find a solution." This was interesting for a few reasons. First, it's solvable, second, it's common, and third, it's a good opportunity to clear a few things up with a good example. To start, I emailed back with "precision questioning." I needed to assert my assumptions and get a few very specific details to make sure this was, in fact, possible. I said. "What library are you trying to use? What versions of each side (core and winforms)? What VS version?" The answer was "I am working with VS2017. The class library is on NETCoreApp 1.1 and the app is a Winforms project on .NET Framework 4.6.2." Cool! Let's solve it. Referencing a .NET Core library from WinForms (running .NET Full Framework) Before we parse this question. Let's level-set. .NET is this big name. It's the name for the whole ecosystem, but it's overloaded in such a way that someone can say "I'm using .NET" and you only have a general idea of what that means. Are you using it on mobile? in docker? on windows? Let's consider that ".NET" as a name is overloaded and note that there are a few "instances of .NET" .NET (full) Framework - Ships with Windows. Runs ASP.NET, WPF, WinForms, and a TON of apps on Windows. Lots of businesses depend on it and have for a decade. Super powerful. Non-technical parent maybe downloads it if they want to run or a game. .NET Core - Small, fast, open source, and cross-platform. Runs not only on Windows but also Mac and a dozen flavors of Linux. Xamarin/Mono/Unity - The .NET that makes it possible to write apps in C# or F# and run them on everything from an iPad to cheap Android phone to a Nintendo Switch. All of these runtimes are .NET. If you learn C# or F# or VB, you're a .NET Programmer. If you do a little research and google around you can write code for Windows, Mac, Linux, Xbox, Playstation, Raspberry Pi, Android, iOS, and on and on. You can run apps on Azure, GCP, AWS - anywhere. What's .NET Standard? .NET Standard isn't a runtime. It's not something you can install. It's not an "instance of .NET."  .NET Standard is an interface - a versioned list of APIs that you can call. Each newer version of .NET Standard adds more APIs but leaves older platforms/operating systems behind. The runtimes then implement this standard. If someone comes out with a new .NET that runs on a device I've never heard of, BUT it "implements .NET Standard" then I just learned I can write code for it. I can even use my existing .NET Standard libraries. You can see the full spread of .NET Standard versions to supported runtimes in this table. Now, you could target a runtime - a specific .NET - or you can be more flexible and target .NET Standard. Why lock yourself down to a single operating system or specific version of .NET? Why not target a list of APIs that are supported on a ton of platforms? The person who emailed me wanted to "run a .NET Core Library on WinForms." Tease apart that statement. What they really want is to reuse code - a dll/library specifically. When you make a new library in Visual Studio 2017 you get these choices. If you're making a brand new library that you might want to use in more than one place, you'll almost always want to choose .NET Standard. .NET Standard isn't a runtime or a platform. It's not an operating system choice. .NET Standard is a bunch of APIs. Next, check properties and decide what version of .NET Standard you need. The .NET Core docs are really quite good, and the API browser is awesome. You can find them at  The API browser has all the .NET Standard APIs ve[...]

Azure DB for MySQL

Fri, 16 Jun 2017 05:00:00 GMT

Jason Anderson joins Scott Hanselman to discuss the newest offering of the Azure Database family – Azure Database for MySQL. With built-in high availability, scalability, and flexible pricing options, there's no excuse to be running MySQL in a VM anymore.

For more information, see:

(image) Jason Anderson joins Scott Hanselman to discuss the newest offering of the Azure Database family – Azure Database for MySQL. With built-in high availability, scalability, and flexible pricing options, there's no excuse to be running MySQL in a VM anymore. For more information, see: Azure Database for MySQLAzure Blog: Announcing Azure Database for MySQL Public PreviewFollow @SHanselman Follow @JasonMA_MSFT Follow @AzureFriday

Media Files: