다음을 통해 공유


진단 코드 MSB4062

이 문서에서는 MSB4062 오류 코드에 대해 설명합니다.

메시지 내용

MSB4062: The 'value' task could not be loaded from the assembly 'value'. 'value' Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

설명

이 오류는 MSBuild가 작업을 실행하기 전에 작업 어셈블리를 로드할 수 없을 때 내보내집니다.

작업이 준비되지 않은 환경에서 실행될 때 오류 MSB4062 발생할 수 있습니다. 예를 들어 작업 어셈블리가 32비트 x86을 대상으로 하지만 64비트 MSBuild 환경에서 실행되는 경우입니다.

S:\BitnessInMSBuild\ShowErrors.proj(13,5): error MSB4062: The "TaskCompiledForx86" task could not be loaded from the assembly S:\BitnessInMSBuild\TaskCompiledForx86\bin\Debug\net472\TaskCompiledForx86.dll. Could not load file or assembly 'file:///S:\BitnessInMSBuild\TaskCompiledForx86\bin\Debug\net472\TaskCompiledForx86.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

해결 방법

태스크가 작업의 UsingTask 요소에 필요한 런타임 환경에 대한 종속성을 표현하는지 확인합니다.

적용 대상

MSBuild의 모든 버전