Entering invalid code into .csx file can crash Visual Studio
1/30/2013 12:20:58 PM
I noticed that if I enter certain invalid code into a .csx file in the Visual Studio editor, I can crash Visual Studio. I will copy the offending code below. On the Sept Roslyn CTP, uncommenting the commented line crashes Visual Studio.
Obviously, the offending line makes no sense (can't refer to 'w' until after the method call completes) but still, Visual Studio should handle it gracefully without crashing.
Window CreateWindow(Action action)
var w = new Window();
if (action != null)
var w = CreateWindow(() =>
// w.Content = new TextBlock("This code makes no sense");