Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio debug fatal error 0x8007000e with .NET 4.5 while debugging .NET 4.0 application

After installing VS2012 and .NET 4.5 both Visual Studio 2010 and 2012 started hanging when debugging our application with a fatal error 0x8007000e. I know this error means the process is out of memory and I can see on task manager the devenv.exe process memory growing until it reaches the 3GB limit. At this point the exception occurs.

On the machines that don't have .Net 4.5 everything works fine. Our application is built in .Net 4.0 and migrating to .Net 4.5 it is not an option. Is there any workaround for this? We would like to start using VS2012 but we can’t migrate all of our applications for .Net 4.5.

Thanks for the help,

Nuno Pereira

like image 897
nflash Avatar asked Nov 19 '12 11:11

nflash


2 Answers

If you run under .NET 4.5 framework, but compile in .NET 4, you might want to try adding this to your config file:

<configuration>
  <system.xml.serialization>
    <xmlSerializer useLegacySerializerGeneration="true"/>
  </system.xml.serialization>
</configuration>

As suggested to me in this link:

Serialization breaks in .NET 4.5

like image 139
omer schleifer Avatar answered Oct 16 '22 03:10

omer schleifer


I've received feedback from Kevin Halverson about this issue. It seems that it is related to XmlSerialization. Generating static serialization assembly prevents the error from happening. Static serialization assembly can be generated using ‘sgen.exe’, ‘svcutil.exe /t:xmlSerializer’ or by turning on the ‘generate serialization assembly’ option on the project’s properties in Visual Studio.

Thanks to Anand and Kevin for all the help.

like image 21
nflash Avatar answered Oct 16 '22 04:10

nflash