msbuild
MSBuild Errors
Error and warning codes emitted by Microsoft Build Engine (MSBuild), the build platform for .NET and Visual Studio projects.
19 codes
references learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-diagnostic-error-codeslearn.microsoft.com/en-us/visualstudio/msbuild/msbuild-errors
· All codes 19 codes
- MSB1001 Unknown Switch The switch passed on the command line is not recognized by MSBuild. Check the spelling and refer to 'msbuild -help' for valid switches.
- MSB1003 Missing Project or Solution File MSBuild could not find a project or solution file in the current directory. Specify the file explicitly or run from a directory containing one.
- MSB1008 Multiple Project Files Specified Only one project file can be specified on the MSBuild command line at a time. Remove the extra project file argument.
- MSB3021 Unable to Copy File MSBuild could not copy a file, often because the destination is locked by another process (e.g. a running application holds the DLL), or access is denied. Close the application or check permissions and retry.
- MSB3027 File Copy Retry Exhausted MSBuild could not copy a file after exhausting the maximum number of retries. The destination file is likely locked. Identify and close the process holding the lock, then build again.
- MSB3030 Source File Not Found for Copy The file to be copied was not found at the expected path. This often happens when a previous build step failed to produce the file, or when paths contain incorrect variables.
- MSB3073 Command Exited With Non-Zero Code A command or script executed as part of a build step returned a non-zero exit code, indicating failure. Inspect the build output above this error for the command's own error messages.
- MSB3101 Could Not Write State File MSBuild could not write its incremental build state file. Check that the build output directory exists and that the current user has write permission to it.
- MSB3202 Project File Could Not Be Loaded MSBuild failed to parse or load the specified project file. The file may be malformed, missing a required XML element, or reference an SDK or import that does not exist.
- MSB3270 Processor Architecture Mismatch A referenced assembly was compiled for a different processor architecture than the project target (e.g. x86 vs x64). Set the project's Platform target to match, or use an AnyCPU reference.
- MSB3277 Conflicting Assembly Versions Two or more referenced assemblies depend on different versions of the same assembly, creating a conflict. Use binding redirects in app.config, or align package versions to resolve the conflict.
- MSB3644 Reference Assemblies Not Found The reference assemblies for the target framework were not found on this machine. Install the corresponding .NET or .NET Framework targeting pack, or update the project's TargetFramework to one that is installed.
- MSB4006 Circular Target Dependency A circular dependency was detected in the build target dependency graph — target A depends on B which depends on A. Restructure the targets to remove the cycle.
- MSB4018 Task Failed Unexpectedly An MSBuild task threw an unhandled exception during execution. Look at the full exception details in the build log to diagnose the underlying cause, which is often a misconfigured task parameter or a bug in a custom task.
- MSB4019 Imported Project Not Found An <Import> or SDK reference in the project file points to a .targets or .props file that does not exist. Install the referenced SDK or NuGet package, or fix the import path.
- MSB4044 Required Task Parameter Missing A required parameter for an MSBuild task was not provided. Check the task's documentation and ensure all required properties are set in the project file.
- MSB4062 Task Could Not Be Instantiated MSBuild could not load or instantiate the specified task class. The assembly containing the task may be missing, incompatible with the current MSBuild version, or the type name may be incorrect.
- MSB4166 Child Build Node Crashed An MSBuild worker node process exited unexpectedly. This can be caused by out-of-memory conditions, native crashes in custom tasks, or antivirus interference. Retry the build; if it persists, add '/m:1' to disable parallel builds and narrow down the failing project.
- MSB4175 Task Factory Could Not Be Loaded The task factory specified in a UsingTask element could not be found or loaded. Ensure the assembly or SDK providing the task factory is installed and that the factory type name is correct.