Edit

Share via


MSB3052 diagnostic code

This article describes the MSB3052 error code.

Message text

MSB3052: The parameter to the compiler is invalid, ''switch''value'' will be ignored.

Description

This error occurs when a command-line input to the Csc task was incorrectly specified, perhaps due to a syntax error, incorrect shell escape character, or missing or incorrect environment variable or property value.

Resolution

Use verbose diagnostics (-v:diag), or generate a binary log and use the MSBuild Structured Log Viewer to get complete information on the parameters to the Csc task that generated this error.

Check syntax and logic involved in the construction of Csc parameter values, including the behavior of escape characters or special characters. Check the values of relevant environment variables and property values that are used to construct the parameters to the Csc task. Especially check that variables using MSBuild property syntax, such as $(PROPERTY_NAME) are resolved, and not passed as literal strings to the compiler.

Applies to

All versions of MSBuild