Home Dashboard Directory Help

ICE in marshal.h by spiderM9


 as Fixed Help for as Fixed

Sign in
to vote
Type: Bug
ID: 519407
Opened: 12/9/2009 4:53:47 PM
Access Restriction: Public
User(s) can reproduce this bug


I'm getting the ICE below (see Details) on every C++/CLI project, targeted to v3.5.
Sign in to post a comment.
Posted by Baldrick on 3/14/2011 at 9:20 AM
This was a little difficult to find but it fixed by problem in VS2010. Oddy enough I had a C++/CLI project which referenced 2x C# projects. In VS 2008 it allowed me to reference only one which itself was dependant on the second C# library. This worked fine.
After the VS2010 upgrade this didn't work so I had to add the reference to both C# projects and that's when I started to get the ICE in marshal.h.
Installing this fixed the issue. Although I don't fully understand the referencing issue I suspect it is something to do with solution vs project based dependency.

Anyway thanks very much for the hotfix.
Posted by Microsoft on 2/17/2011 at 12:40 PM
Hello -

Was looking across old bugs and came across this feedback item. Although the KB http://support.microsoft.com/kb/976656 seems unrelated, the fix for your issue is included in that compiler release.

Even though you are using the VS2010 IDE, because you are targeting the v3.5 framework, the VS2008 tools are being used, which is why a VS2008 QFE is necessary. Note: in order to install this QFE, you must have also installed the VS2008 SP1 release.

Andy Rich
Visual C++ QA
Posted by Terry66 on 10/27/2010 at 2:37 PM
In my tests, ICE didn't occur if "precompiled headers" is used (just default stdafx.h/cpp). If not using precompiled headers, I'll see the ICE.

Project was targeted to v3.5. IDE was VS2010 v10.0.30319.1 on Windows 7.
Posted by Chris Shumway on 10/6/2010 at 2:31 PM
The hotfix linked below appears to be unrelated (it targets VS2008 and a different error). I can reproduce the same error with VS2010 v10.0.30319.1 on Windows 7:

2>c:\program files\microsoft visual studio 9.0\vc\include\msclr\marshal.h(49): fatal error C1001: An internal error has occurred in the compiler.
2> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x5212D33B:0x00000030]', line 182)
Posted by Microsoft on 2/18/2010 at 7:54 PM

Thanks for reporting this issue. The issue has been fixed and is available as a hotfix referred in the KB article here:


Amit Mohindra
Visual C++ Team
Posted by Microsoft on 12/10/2009 at 3:25 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by Chris Shumway on 4/14/2011 at 5:53 PM
Following the discussion at http://stackoverflow.com/questions/2106163/target-net-3-5-c-cli-in-visual-studio-2010-beta-2 I was able to compile successfully by adding the following two lines to my vcxproj file inside <PropertyGroup Label="Globals">: