Edit

Share via


Command-line errors and warnings

The articles in this section provide a reference to the command-line errors and warnings generated by the build tools. These messages have the form Dxxxx, where xxxx is a four-digit number.

Important

The Visual Studio compilers and build tools can report many kinds of errors and warnings. After an error or warning is found, the build tools may make assumptions about code intent and attempt to continue, so that more issues can be reported at the same time. If the tools make the wrong assumption, later errors or warnings may not apply to your project. When you correct issues in your project, always start with the first error or warning that's reported, and rebuild often. One fix may resolve multiple subsequent errors.

To get help on a particular diagnostic message in Visual Studio, select it in the Output window and press the F1 key. Visual Studio opens the documentation page for that error, if one exists. You can also use the search tool at the top of the page to find articles about specific errors or warnings. Or, browse the list of errors and warnings by tool and type in the table of contents on this page.

Note

Not every Visual Studio error or warning is documented. In many cases, the diagnostic message provides all of the information that's available. If you landed on this page and think the error or warning message needs additional explanation, let us know by using the feedback buttons on this page. If you think the error or warning is wrong, or you've found another problem with the toolset, report a product issue on the Developer Community site. You can also send feedback and enter bugs within the IDE. In Visual Studio, go to the menu bar and choose Help > Send Feedback > Report a Problem, or submit a suggestion by using Help > Send Feedback > Suggest a Feature. Some compiler error topics were created that are not emitted by the compiler and now redirect to this page instead.

You may find additional assistance for errors and warnings in Microsoft Q&A C++ forums. Or, search for the error or warning number on the Visual Studio C++ Developer Community site. You can also search Stack Overflow to find solutions.

For links to additional help and community resources, see Visual C++ Help and Community.

Command-line error messages

Error Message
Command-Line Error D8016 'option1' and 'option2' command-line options are incompatible
Command-Line Error D8021 invalid numeric argument 'number'
Command-Line Error D8022 cannot open 'messagefile'
Command-Line Error D8027 cannot execute 'component'
Command-Line Error D8036 '/option' not allowed with multiple source files
Command-Line Error D8037 cannot create temporary il file; clean temp directory of old il files
Command-Line Error D8045 cannot compile C file 'file' with the /clr option
Command-Line Error D8048 cannot compile C file 'file-name' with /ZW option
Command-Line Error D8049 cannot execute 'compiler-component': command line is too long to fit in debug record

Command-line warning messages

Warning Message
Command-Line Warning D9024 unrecognized source file type 'filename', object file assumed
Command-Line Warning D9025 overriding 'option1' with 'option2'
Command-Line Warning D9026 options apply to entire command line
Command-Line Warning D9027 source file '<filename>' ignored
Command-Line Warning D9028 minimal rebuild failure, reverting to normal build
Command-Line Warning D9035 option 'option' has been deprecated and will be removed in a future release
Command-Line Warning D9036 'option_2' instead of 'option_1'
Command-Line Warning D9040 ignoring option '/analyze'; Code Analysis warnings are not available in this edition of the compiler
Command-Line Warning D9041 invalid value 'option-value' for '/option-name'; assuming 'assumed-value'; add '/analyze' to command-line options when specifying this warning
Command-Line Warning D9043 invalid value 'warning_level' for 'compiler_option'; assuming '4999'; Code Analysis warnings are not associated with warning levels

See also

C/C++ Compiler and build tools errors and warnings