简体   繁体   中英

Why can't I run debug version of .NET program in the machine didn't install visual studio

I have a debug version of a .NET 4.0 application, I install the .NET 4.0 Framework in in this machine, however, I didn't install Microsoft Visual Studio.

Why I can only run Release version of application, but can't run the debug version of application?

I guess dlls in the debug version of application may refer to some dll of Visual Studio? Does anyone know exactly why?

A debug build is specifically for debugging your program. It includes some extra protections and hooks to allow you to step through and test your program. These require special debug runtimes that generally come with Visual Studio.

A release build strips all of this extra functionality, so all you need to run it is the .NET framework.

EDIT: After some more research, it does look like the debug builds should be roughly equivalent to the release builds. The main difference seems to be that the debug build creates a pdb file with the extra lookup info for the debugger, and may be a little less aggressive with optimizations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM