2
내 어셈블리에서 메소드를 디 컴파일하려고합니다. 'Microsoft.SharePoint.dll',하지만 컴퓨터에 SharePoint가 설치되어 있지 않습니다. 다음 코드를 사용하면 Mono.Cecil.AssemblyResolutionException '어셈블리 Microsoft.SharePoint를 확인할 수 없습니다.'가 발생합니다.ILSpy AstBuilder에서 "어셈블리를 분석하지 못했습니다"
AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly("PathToMyAssembly");
ICSharpCode.Decompiler.DecompilerContext context = new ICSharpCode.Decompiler.DecompilerContext(assembly.MainModule);
AstBuilder decompiler = new AstBuilder(context);
decompiler.AddMethod(method); <!-- here it crashes -->
ILSpy GUI를 사용하면 SharePoint가없는 동일한 컴퓨터에서 오류없이 어셈블리를로드 할 수 있습니다.
코드를 변경하려면 어떻게해야합니까?
나는 당신이 지금 당신의 자신의 대답을 받아 들일 수 있다고 생각합니다. :) – Artemix