Enter the following code into an open .csx file in the Visual Studio editor and then uncomment the commented line.
#r "PresentationCore"
#r "PresentationFramework"
#r "System.Xaml"
#r "WindowsBase"
using System.Windows;
using System;
Window CreateWindow(Action action)
{
var w = new Window();
if (action != null)
w.Dispatcher.Invoke(action);
return w;
}
var w = CreateWindow(() =>
{
// w.Content = new TextBlock("This code makes no sense");
});
Visual Studio will crash (at least on CTP3).
Editor should highlight syntax/compilation error, but Visual Studio should not crash.