2017-12-12 12 views
0

얼마 전에 ILMerge가 변경되어 보안 관련 속성이 삭제되었습니다.ILMerge가 보안 관련 속성을 삭제하는 이유는 무엇입니까?

질문 :

는 는
  • 왜이 기능이 구현
      ?
    • 게시 된 어셈블리를 만드는 데 사용되는 도구의 개인 빌드에서 안전하게 제거 할 수 있습니까?

      #region Deal with [ComVisible] and security attributes 
          var thisAssemblyIsComVisible = GetComVisibleSettingForAssembly(a); 
          AttributeNode assemblyComVisibleAttribute = null; 
          if (thisAssemblyIsComVisible != targetAssemblyIsComVisible) { 
          InstanceInitializer ctor = SystemTypes.ComVisibleAttribute.GetConstructor(SystemTypes.Boolean); 
          assemblyComVisibleAttribute = new AttributeNode(new MemberBinding(null, ctor), new ExpressionList(new Literal(thisAssemblyIsComVisible, SystemTypes.Boolean))); 
          } 
          for (int i = 0, n = a.Attributes == null ? 0 : a.Attributes.Count; i < n; i++) { 
          AttributeNode aNode = a.Attributes[i]; 
          if (aNode == null) continue; 
          if (aNode.Type == SystemTypes.ComVisibleAttribute) { 
           a.Attributes[i] = null; 
           continue; 
          } 
          if (aNode.Type == SystemTypes.SecurityCriticalAttribute 
           || aNode.Type == SystemTypes.SecurityTransparentAttribute 
           || aNode.Type == SystemTypes.AllowPartiallyTrustedCallersAttribute 
           || aNode.Type.FullName.Equals("System.Security.SecurityRules") 
          ) { 
           WriteToLog("Assembly level attribute '{0}' from assembly '{1}' being deleted from target assembly", 
           aNode.Type.FullName, a.Name); 
           a.Attributes[i] = null; 
           continue; 
          } 
          } 
          #endregion 
      

      그것은 어떤 사람들에게는 문제가 발생 :

      the source code에서의 구현은, FWIW, 여기 그 문제를 피하기 위해 (그러나 나는 그렇게 할 수 없다. 이전 버전의 ILMerge가 WIndows 10에서 실행되지 않기 때문입니다.

    ILMerge를 사용하여 AllowPartiallyTrustedCallers 특성을 가진 어셈블리를 작성하고 싶습니다. 이전 버전의 ILMerge를 사용 했었고 더 이상 사용할 수없는 이유를 모르겠습니다.

    ILMerge를 전혀 사용하지 않아서 (즉, 병합 할 여러 프로젝트를 빌드하는 대신 모든 소스 코드를 하나의 프로젝트에 넣음으로써) 내가 그 해를 무엇인지 알 수 없다. 즉 왜 ILMerge는 더 이상이 작업을 수행하지 않습니다.

  • 답변

    1

    대신 현재 명령 줄이 ILMerge와 동일하며이 제한이없는 ILRepack을 사용하고 있습니다.