debugging - Is there any class count limit in MFC project compiled with /CLR -



debugging - Is there any class count limit in MFC project compiled with /CLR -

with risk fall specific question...

given c++ mfc (mixed, not shaked) project compiled /clr, have 200 classes defined.

when add together new empty class project, error raises when compile , execute in debug mode.

an unhandled exception of type 'system.io.fileloadexception' occurred in unknown module.

additional information: not load file or assembly 'projecta, version=0.0.0.0, culture=neutral, publickeytoken=null' or 1 of dependencies. not find or load type. (exception hresult: 0x80131522)

projecta name of mfc project itself. there no reference projecta assembly on project configuration, , there no reference custom assembly.

this project have references .net framework assemblies, in order allow of custom defined classes in project can utilize clr classes.

then, question is...

do know whether there limitation of class number on mfc c++ project?

edit:

as in comments, in release mode compilation succeed without errors.

also, clean, build, clean, close visual studio, reboot computer... , problem still appears. if maintain in 200 classes, there no error. when go 201, error appears.

currently i'm trying reproduce in new default mfc project, adding classes till arrive 200, confirm there real limitation.

edit 2: error fixed

great. @msx , @frymode show me how avoid error comments.

in visual studio development environment (source / source):

open project's property pages dialog box. click c/c++ folder. click code generation property page. modify enable string pooling (/gf) property.

thank guys!

this link shows there's no limit number of types can have in namespace (not project). considering, namespace can split across different assemblies, could, @ to the lowest degree in theory, have unlimited number of types. however, this post affirms maximum number of classes in .dll 16777215. probably, you'll run out of memory before reach number of classes :)

just information: there seems limit number of fields per class, though.

p.s.: here's solution problem taken this link

open project's property pages dialog box. click c/c++ folder. click code generation property page. modify enable string pooling property.

debugging visual-studio-2013 mfc c++-cli clr

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -