Creating IronPython project causes crash

I have both VS2010, and VS2012 shells installed. Whenever I try to create an IronPython project, or switch to IronPython debugging, visual studio will CTD. It does this for both VS2010, and VS2012.

It says "Visual studio has stopped working" and crashes. I'm pretty sure it used to work on this PC. If I go into Tools -> Options ->Python Tools, interpreter options, I can set up an IronPython Interpreter, and that appears to work just fine.

On rereading, I see that you said you set up an IronPython interpreter manually. Normally we should detect IronPython automatically; did you install it from the packages on their site or was it part of another application?

It auto detected them, but it would crash every time I tried to create an IronPython project, or try to switch the project to start with IronPython. I manually created an intrpreter after that, and was able to switch the project to it, but still can't
"create" an IronPython project without crashing. I'm not able to access the PC with the problem at the moment, but I did send the crash report in.

It also appears that with the manual interpreter, the intellisense for .NET objects does not appear to work.

I've tried uninstalling/reinstalling PTVS, the shells, and so far no luck.

This is only happening on my Home PC, the one at work is working just fine.

Thanks for that. I found the report and there's definitely a problem loading IronPython. Are you able to start the IronPython console directly? It may help to uninstall and reinstall IronPython. If that doesn't help, I'll ask around here to find out what
else we can try. It's very rare to see a crash like this inside clr.dll.

I'm randomly having the same issue, and when I uninstall Ironpython, and reinstall it, things start working again. Any thoughts would be greatly appreciated. It's getting annoying.

Edit to add additional information.

There are times where it's a little different, but that seems to depend on weather the interactive window was/is open.
When it was open, I started VS in safemode, and got this entry on the interactive window.

While in safe mode, if I close the interactive window, and restart Visual Studio, I can then open visual studio, but I get the same crash whenever I try to open an existing IronPython project, or start a new IronPython project.

I suspect something is messing up your IronPython install, but it's hard to tell what exactly. What we probably need to see here is where the 1st exception is coming from which is causing this. Can you launch 2 copies of Visual Studio, and to Debug->Attach
to Process and attach to the other one? You'll need to configure VS so that "Just my Code" is disabled in Tools->Options-Debugging->Enable just my Code and then make sure in Debug->Exceptions that breaking on thrown CLR exceptions is enabled
(both of these options should be set in the VS you do the attach from).

Then open a IronPython project or interactive window and hopefully you'll break into the VS doing the debugging with a stack trace and exception. If you can send that back to us it might be obvious what the issue is.

Sometime this works sometimes it doesn't. The best way to make it work was to rebooted after unistallation. But after the next rebooting or even after waking the machine up from sleep mode the problems are the same: VS shell starts but crashes as soon as I
try to open an existing Python file or try to create one. This is really annoying, because each time I want to use VS with IronPython I need one or two de-installations/re-installations like described above...

Do you have any events showing up in your Windows event viewer? (Start -> Event Viewer -> Application) If Visual Studio is crashing completely then there should be some entries here. Also, make sure you let Windows send error reports - we can use
these to help figure out what's going on.

If this is the same issue, there is probably no need to reinstall Visual Studio and PTVS, since it is IronPython that isn't loading correctly. (You can check this by ensuring that PTVS works fine with a CPython interpreter and without IronPython installed.)

Thanks. I've done some research into the reports that have been sent in and it seems this is an issue in the .NET framework. It's been around for a while and affects a lot of different applications, but every time somebody opens a bug internally we can't
find a way to reproduce the issue.

We're talking to people internally to find a fix or workaround, but right now the best I can offer is that it only occurs on Windows 7. While I don't expect you to upgrade to Windows 8 just to fix this (though you can if you like), it's possible that an update
is available for Win7 that will fix it. This may be an optional update that you'll need to manually install - we haven't found anyone who can confirm that this has been fixed yet.

Do you happen to have SharpDevelop installed? It was one of the programs I had installed when I was having the issue. I was messing around w/ various IronPython solutions, and this was one of the ones I was using. It was also one of the programs I uninstalled.
It was on my suspect list because it uses an IronPython install.

It was suspect to me because of the IronPython install, so it was one of the programs I tried uninstalling. After that, and an uninstall of VS + PTVS, and reinstall, things have worked ever since. I liked the windows forms designer too, but I haven't bothered
re-installing it to see if it was the issue.

I deinstalled SharpDevelop two days ago and had no problems since with VS and Python projects. That is fine but still annoying because I know no other Windows forms designer for Python than SharpDevelop.

I, too, am suffering from these crashes. At random, I will be unable to load an ipy solution. The only fix so far has been to uninstall/reinstall ironpython. Simply repairing ironpython does not work. I do not have to reinstall vs, ptvs, etc to get back
in working order. This is with win7 x64 and vs 2012 integrated shell. But, I also have these problems with ironpython solutions when working under vs 2010 pro on win7 x64 on another machine. I just ended up not using ironpython on that pc.

Just putting it out there that I would also like this fixed. Thanks.

Also, i saw the previous suggestions of uninstalling sharpdevelop. This did not fix my issue with opening ipy solutions in vs 2012 after uninstalling #develop 4.3. I uninstalled #develop, and ended up having to uninstall/reinstall ironpython anyway.

I only just this morning uninstalled sharpdevelop, and right after that, attempted to start vs 2012 and open an ipy solution which crashed. I then uninstalled/reinstalled ironpython and had it work. I haven't reinstalled #develop.

I don't have any other programs that use or include ironpython. But if I continue to get crashes, I will post back. Once I have vs running I tend to leave it running until it crashes, so it may be a while or never (hopefully) that it crashes. Today I had my
first crash when I had been working in an ipy project, I switched over to a cpython 3.3 project, and then when I switched back to my ipy project vs crashed. Neither of these projects are large though. The ipy project consists of a few wpf controls and not
a lot of code yet.

Often when VS crashes (and sends an error report in, which are amazingly helpful, so please send them) you can find an Error entry in your Event Viewer under Application that includes a stack trace. If you send that in with any reports then it'll make
our lives much easier.

Hi, I am not sure if this is of any intrest anymore, but i had exactly the .net runtime exception and similar issues with my VS2k13Shell+IronPython installation. I had crashed while creating new Python-WinForms (or any other Python) Projects. I have also
a few other IDEs (VS Express 2k12 for Desktop, SharpDevelop 4.3, PyCharm 3.0, IntelliJ 12.1.6) installed. (And a Dragon Natural speaking, it has Python-things, too i think, maybe it matters so i mention it). After the suggested solution

So, yes, I am using Windows 7 (x64 Home Premium SP1) currently, but i am going to setup another computer with Windows 8.1 soon (hopefully) and I am thinking about setting the same Dev Tools, so maybe I will be able to confirm or deny the issue on that one.
I'll post a update if I really do this.

Thus I am thinking about putting it inside (The OS, dont get me wrong) a Level-0-Hypervisor like 2012 Core or ESXi so I am able to "move" my whole setup without going thrugh the whole installing processes in the future. But that shouldn't consider
Python Tools too much, In fact, I am not sure if it would even know about it.

Just for your information: I also was affected by this same issue. Uninstalling IronPython and reinstalling (which seems to drop the ngen images) has solved the problem for me.
I'm also using Windows 7 64 Bit Professional, and VS 2010, and have SharpDevelop installed.