2
Postsharp에서 컴파일 타임 동안 어셈블리의 프로젝트 폴더/프로젝트 파일 또는 출력 경로를 찾을 수 있습니까? 예 : 어셈블리가 빌드 될 때의 CompileTimeInitialize 중일 때 ?Postsharp 컴파일 시간 동안 프로젝트 경로/출력 경로 가져 오기
Postsharp에서 컴파일 타임 동안 어셈블리의 프로젝트 폴더/프로젝트 파일 또는 출력 경로를 찾을 수 있습니까? 예 : 어셈블리가 빌드 될 때의 CompileTimeInitialize 중일 때 ?Postsharp 컴파일 시간 동안 프로젝트 경로/출력 경로 가져 오기
당신은 컴파일 시간 동안 'MSBuildProjectFullPath'속성을 평가하여 현재 프로젝트 파일의 경로를 찾을 수 있습니다
public override void CompileTimeInitialize(MethodBase method, AspectInfo aspectInfo)
{
string projectPath =
PostSharpEnvironment.CurrentProject
.EvaluateExpression("{$MSBuildProjectFullPath}");
}
다른 PostSharp 속성의 목록이 documentation page에서 찾을 수 있습니다.
친절하게 고마워, 그게 내가 필요한거야. – Cerebrate