Question

Blend for Visual Studio is crashing whenever I create a User Control and add it to a page.

I am running the latest version of Visual Studio, here are my steps taken:

  1. Right Click Grid Element located on XAML Page (has many children)
  2. Click Make Into User Control
  3. Build Project
  4. Blend Crashes

Once Blend crashes, I am able to see these errors generated in an error log and the design view in Visual Studio (which no longer displays my app). Sometimes the first error is shown, and occasionally the second one is shown:

Error 1

System.NullReferenceException: Object reference not set to an instance of an object.
 at System.Net.Sockets.SocketNotificationManager..ctor()
 at System.Net.Sockets.Socket.get_SocketManager()
 at System.Net.Sockets.Socket.Finalize()

Error 2

System.NullReferenceException: Object reference not set to an instance of an object.
 at System.Net.Sockets.SocketNotificationManager.Finalize()

Has anyone else encountered this before? I have also tried creating a UserControl via Right Click Project > Add Item > User Control to the same effect.

Was it helpful?

Solution

I figured out the issue. I had an extension for Visual Studio called XAML Spy, I uninstalled it, and removed it from my .csproj file. Everything works fine now.

Hopefully this helps someone else out.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top