진단 코드 MSB4186
이 문서에서는 MSB4186 오류 코드에 대해 설명합니다.
메시지 텍스트
MSB4186: Invalid static method invocation syntax: 'value'. 'value' Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). Check that all parameters are defined, are of the correct type, and are specified in the right order.
발언
이 오류는 MSBuild가 정적 메서드를 호출하는 데 잘못된 구문을 사용하는 함수 호출을 발견할 때 발생합니다. MSBuild에서는 올바른 구문을 사용하여 정적 메서드를 호출해야 합니다. $([FullTypeName]::Method(Parameters))
.
해상도
이 오류를 해결하려면 닫는 ]
및 ::
포함하여 적절한 구문을 사용하여 정적 메서드를 호출해야 합니다.
<PropertyGroup>
<MyProperty>$([ClassName]::MethodName('a', 'b'))</MyProperty>
</PropertyGroup>
적용 대상
MSBuild의 모든 버전