Roundup #3 – VS Live Share, ML.NET, Desktop .NET Core, EF6.3 on .NETCore3, Hyper-V Android Emulator

Since this week was Microsoft Build 2018, these were the top 5 things that came out of it for me.  Obviously I’m leaning towards the topics that affect me the most.  I’d love to hear what you found most interesting.  Let me know in the comments or on Twitter.

 

Visual Studio Live Share

If you work remotely or want to screen share with a co-worker in another office, you know how terrible most of current solutions are.  VS Live share was announced in preview back in November 2017 and is now available.

It doesn’t matter what type of app you’re building, what language you’re programming in, or what OS you’re on: when you need to collaborate, Live Share will instantly share your project with a teammate. Edit and debug together in real time without teammates needing to clone a repo or set up their environment.

Link: https://www.visualstudio.com/services/live-share/

 

.NET Core 3 to support WinForm, XAML & UWP

At Microsoft Build Live today, we are sharing a first look at our plans for .NET Core 3. The highlight of .NET Core 3 is support for Windows desktop applications, specifically Windows Forms, Windows Presentation Framework (WPF), and UWP XAML. You will be able to run new and existing Windows desktop applications on .NET Core and enjoy all the benefits that .NET Core has to offer.

Link: https://blogs.msdn.microsoft.com/dotnet/2018/05/07/net-core-3-and-support-for-windows-desktop-applications/

 

Introducing ML.NET: Cross-platform, Proven and Open Source Machine Learning Framework

Today at //Build 2018, we are excited to announce the preview of ML.NET, a cross-platform, open source machine learning framework. ML.NET will allow .NET developers to develop their own models and infuse custom ML into their applications without prior expertise in developing or tuning machine learning models.

ML.NET was originally developed in Microsoft Research and evolved into a significant framework over the last decade; it is used across many product groups in Microsoft like Windows, Bing, Azure, and more .

Link: https://blogs.msdn.microsoft.com/dotnet/2018/05/07/introducing-ml-net-cross-platform-proven-and-open-source-machine-learning-framework/

 

Entity Framework 6.3 on .NET Core 3

At Microsoft Build 2018 they also announced that Entity Framework 6.3 will run on .NET Core 3.  This is pretty big news if you want to migrate to .NET Core but have giant road block of Entity Framework and can’t easily move to EF Core.

Hyper-V Android emulator support

Today, at Build 2018, we announced a preview of the Google Android emulator that’s compatible with Hyper-V, available on the Windows 10 April 2018 Update. This enables developers with Hyper-V enabled on their machines to use a hardware accelerated Android emulator, without needing to switch to Intel’s HAXM hypervisor. Amazing work was done by the Windows Hyper-V team, with help from the Xamarin team, to make to this happen.

Link: https://blogs.msdn.microsoft.com/visualstudio/2018/05/08/hyper-v-android-emulator-support/

 

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Roundup #2

dotMemory Unit

dotMemory Unit is a unit testing framework which allows you to write tests that check your code for all kinds of memory issues. You can now extend NUnit, MSTest or another .NET unit testing framework with the functionality of a memory profiler.

Perfect fit for any workflow: integrated with Visual Studio, works with stand-alone unit test runners, Continuous Integration ready. Last but not least, dotMemory Unit is free.

This week I was running into some memory issues with 3rd party library.  I just stumbled up on dotMemory Unit and proved to be really useful to verify no memory leaks.

Link: https://www.jetbrains.com/dotmemory/unit/

Directory.Build.targets Example

This repository shows an example of controlling NuGet package versions at the repository level, while at the same time ensuring that projects only opt into packages that they want.

This is fantastic.  Ability to specify all the NuGet packages and the version that your solution projects can opt-in without having to worry about the version per project.  This is especially useful when you have a solution with multiple projects that all need to reference the same NuGet package.  This allows you to keep them in sync without having to worry keeping the versions in-sync across multiple csproj and <PackageRefernece>.  Lovely.

Link: https://github.com/davkean/maket

 

WinDbg Preview

We’ve updated WinDbg to have more modern visuals, faster windows, a full-fledged scripting experience, and Time Travel Debugging, all with the easily extensible debugger data model front and center. WinDbg Preview is using the same underlying engine as WinDbg today, so all the commands, extensions, and workflows you’re used to will still work as they did before.

I blogged about Troubleshoting Stackoverflow Exceptions, and WinDbg came in really handy.  I first used the original version and then realized there is a new WinDbg in the Windows Store that has a much needed UI refresh.

Link: https://www.microsoft.com/en-us/store/p/windbg-preview/9pgjgd53tn86

 

Indu Alagarsamy – Autonomy & Asynchrony: The Key To Designing Reliable Systems

I was lucky enough to present at this conference in 2017.  I thought this was a great presentation and refer people to watch it all the time.  Highly recommend if you are interested in Event Driven Architecture.

Explore DDD 2017 – Denver, Sept. 21-22 The real world, with all its complexity, can at the same time be simple, elegant and beautiful. It thrives on autonomy and asynchrony, the two most important things that bring order to chaos. The real world does not pause for something to complete before moving on. And yet, when we write software, “Command and Control” is the norm. We find clever ways of doing this while keeping up with all the new technologies and the languages in fashion, all the while ignoring the realities of life. In this session, explore an alternate universe in which Event Driven Architecture can power even the most complex mission-critical systems. Learn how communicating asynchronously via events leads to building systems that are autonomous and much more reliable. Embrace asynchrony and autonomy. Make the complex simple.

About Indu Indu Alagarsamy has been programming for over 15 years. She is currently part of the development team at Particular Software, the makers of NServiceBus, practicing her passion. Indu is also passionate about diversity and inclusiveness in the tech industry. When not programming, she is either rock climbing in sunny Southern California or having fun with her kids!

Link: https://www.youtube.com/watch?v=v-7RevY6No4

 

.NET Framework 4.7.2 Release Notes

If you’re running full framework, you might want to check out the release notes to see if there are any improvements for your workloads.  Quite a few BCL and CLR bug fixes.

Link: https://github.com/Microsoft/dotnet/blob/master/releases/net472/README.md

Feedback

If you have any content you want me to take a look at to include in my next Roundup, let me know in Twitter or in the comments.  If you enjoyed this roundup, I plan on emailing them out weekly after posting.  Sign up below!

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Troubleshooting StackOverflow Exceptions

Is your .NET application randomly crashing? In Production? Without any relevant application logs?  You may be hitting a StackOverflowException if you see exception code 0xc00000fd in the event log. Here’s how to start troubleshooting StackOverflow Exceptions.

0xc00000fd

First take a look in your event log.  If you see a log similar to this:

Faulting application name: MyApp.exe, version: 1.0.0.0, time stamp: 0xdfd8c80b
Faulting module name: clr.dll, version: 4.7.2558.0, time stamp: 0x59d413ce
Exception code: 0xc00000fd

The important part here is the exception code 0xc00000fd is a StackOverflowException.

Troubleshooting a .NET StackOverflowException

First thing I would recommend is looking for any recursion in your codebase.  This is often likely the cause when you have unbounded recursion.  It may not be obvious if you have data structures that play a role in your application and specifically where recursion exists.

Debug Diagnostics Tool (DEBUGDIAG)

If you can’t determine where the StackOverflowException is occuring, first place to start is by downloading and installing the Debug Diagnostics Tool from Microsoft.

https://www.microsoft.com/en-us/download/details.aspx?id=49924

Once installed, run the “DebugDaig 2 Collection” application.  You will be immediately prompted with the following window:

If you’re running ASP.NET 4.x you will likely be selecting IIS, select the first option.  Otherwise, you likely are going to select a process or a NT Service (Windows Service).

On the follow window, click the Exceptions button.

DebugDiag

From here we can specify to capture a StackOverflow exception.  Change the Action Type to a Full userdump.

DebugDiag

Finally, click OK and Next to save the new Crash Rule.

Once your application hits a StackOverflowException and crashes, you will have a .dmp file in the rule folder.

DebugDiag

WinDbg

Once you have your memory dmp file, we are going to want to open it up with WinDbg.

You have a couple options for installing.  You can download Windows Driver Kit (WDK) which which require you to have latest Visual Studio with Desktop Development with C++ component installed.

https://go.microsoft.com/fwlink/?linkid=873060

Another option is to download the the new WinDbg Preview from the Windows Store.  This is a new version of WinDbg with a more modern look.

Once you have WinDbg, whatever version, you can now type in .loadby sos clr in the Command input.

WinDbg

Followed by !CLRStack as the next command, which should then provide you with your .NET call stack.

WinDbg

If you have any recommendations on WinDbg usage or other useful insights, please share them in the comments or on Twitter.

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.