UiPath, Publish Error 기록

김와티·2022년 12월 12일
0
라이브러리 컴파일 프로세스 도중에 예기치 않은 다음 오류가 발생했습니다.
어셈블리 컴파일에서 다음 오류가 발생했습니다.
 * 'Process' 네임스페이스에 이미 'XXProcess.Framework'에 대한 정의가 포함되어 있습니다.
 * 'UiPath.System.Activities'이(가) 사용하는 'System.Diagnostics.Process, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 어셈블리 참조가 'System.Diagnostics.Process'의 'System.Diagnostics.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'과(와) 일치하는 것으로 간주합니다. 런타임 정책을 지정해야 합니다.
 * 'UiPath.System.Activities'이(가) 사용하는 'System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 어셈블리 참조가 'System.Data.Common'의 'System.Data.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'과(와) 일치하는 것으로 간주합니다. 런타임 정책을 지정해야 합니다.
 * 'UiPath.System.Activities'이(가) 사용하는 'System.Data.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 어셈블리 참조가 'System.Data.Common'의 'System.Data.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'과(와) 일치하는 것으로 간주합니다. 런타임 정책을 지정해야 합니다.
 ...

현상

  • 에러 로그를 보면 UiPath.System.Activities에 관한 내용이 반복적으로 표현이 되고있다.
  • 런타임 정책을 지정해야 합니다. 라는 문구가 반복적으로 나오고 있다.

과정

  • 처음에는 System.Data.Common 을 어디선가 잘못 import했을까? 였지만 아니였음.
    • System.Text.RegularExpressions import하다가 뭐 잘못 건드렸나?
    • .xaml 단위로 검토해야하나? 생각했는데 프로젝트에 파일이 너무 많아서 찾기엔 엄두가 안 났음
  • Package 간에 의존성오류가 있는 것 같다는 생각이 듦
  • 의존성 오류, 런타임 에러 비슷하다는 생각이 듦
  • Package 간에 어떻게 참조하고 있는 버전을 맞출 수 있을까?
  • project.json 내용
    • "dependencies": {
        "UiPath.Excel.Activities": "[2.16.0]",
        "UiPath.System.Activities": "[22.10.4]",
        "UiPath.Testing.Activities": "[22.10.0]",
        "UiPath.UIAutomation.Activities": "[22.10.3]"
       }
    • \.project\design.json, \.project\PackageBindingsMetadata.json 등. .json파일 전부 확인했는데, 패키지 호환? 설정? 내용 없음
    • Dependencies (Windows)의 등호, 부등호를 조작해서 의존성 관계를 바꿀 수 있기를 희망했음
      • node.js 처럼 package.json 같은게 있었으면 했지만 없었음

결론 A (반려)

  • Package Manager 에서 UiPath.System.ActivitiesRuntime Rule:❓ 되어있는 부분을 클릭 후
    • Lowest Applicable Version 선택 후 Save 하면 됨
    • Publish 잘 됨
    • 다시 Runtime Rule:❓Strict 하고 Save, 이후 Publish 해봄, 잘 됨
    • UiPath.System.Activities 는 프로젝트에 기본적으로 포함된 패키지 인데, Strict로 보이는데.. 보이는 것과 상관없이 Lowest Applicable Version 상태 였을까?
    • 왜 다시 원래대로 Strict설정을 하고 Publish 해도 충돌이 나지 않을까?
    • 왜 이 에러를 이제야 만났을까? 난 여태 항상 Strict로 설정했었는데, 의문이 남는다.

결론 B

뭔가 잘못 Import 한게 아닐까?
아니면 Package네임스페이스 충돌이 있는 것 같음

# Process 네임스페이스를 확인해 보자. 억울하다.🫠 
# 오류 메시지
'Process' 네임스페이스에 이미 'XXProcess.Framework'에 대한 정의가 포함되어 있습니다.

Process.xaml 네임스페이스에 뭔가 이미 정의되어 있다고 하는데..
Process.xaml삭제하고 ❗대체 파일, 이름바꿔서❗ 생성해서 작업 하고
Publish 하는 것을 추천
특정 Runtime Rule이 계속 Process.xaml 파일명을 바라보는 듯 함. 기존파일명 그대로 Process.xaml Publish하는 경우, 오류 발생함

참고

  • 런타임 정책Runtime Rule섞어서 검색하면 바로 UiPath 공식 사이트 Docs 검색/연결 됨.
  • Lowest Applicable Version 선택 했을 때, project.jsonUiPath.System.Activities버전 양 옆의 괄호가 사라짐.
    • 호환 가능한 낮은 버전을 찾는다는 의미표현이project.josn에서 저거 인듯
    • "dependencies": {
        "UiPath.Excel.Activities": "[2.16.0]",
        "UiPath.System.Activities": "22.10.4",  <<<<<<<<<<<<<<<<<<<<< 여기
        "UiPath.Testing.Activities": "[22.10.0]",
        "UiPath.UIAutomation.Activities": "[22.10.3]"
      }

uipath-managing-dependencies

  • Adding and Updating Dependencies
  • Removing Dependencies
  • Repairing Dependencies
  • setting-dependency-rules
  • Resolving Dependency Conflicts

learn-microsoft-dependency-resolution


<!-- 기본 .xaml 파일 생성시, 기록용 -->
<TextExpression.NamespacesForImplementation>
        <sco:Collection x:TypeArguments="x:String">
            <x:String>System.Activities</x:String>
            <x:String>System.Activities.Statements</x:String>
            <x:String>System.Activities.Expressions</x:String>
            <x:String>System.Activities.Validation</x:String>
            <x:String>System.Activities.XamlIntegration</x:String>
            <x:String>Microsoft.VisualBasic</x:String>
            <x:String>Microsoft.VisualBasic.Activities</x:String>
            <x:String>System</x:String>
            <x:String>System.Collections</x:String>
            <x:String>System.Collections.Generic</x:String>
            <x:String>System.Data</x:String>
            <x:String>System.Diagnostics</x:String>
            <x:String>System.Drawing</x:String>
            <x:String>System.IO</x:String>
            <x:String>System.Linq</x:String>
            <x:String>System.Net.Mail</x:String>
            <x:String>System.Xml</x:String>
            <x:String>System.Xml.Linq</x:String>
            <x:String>UiPath.Core</x:String>
            <x:String>UiPath.Core.Activities</x:String>
            <x:String>System.Windows.Markup</x:String>
        </sco:Collection>
    </TextExpression.NamespacesForImplementation>
    <TextExpression.ReferencesForImplementation>
        <sco:Collection x:TypeArguments="AssemblyReference">
            <AssemblyReference>System.Activities</AssemblyReference>
            <AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
            <AssemblyReference>System.Private.CoreLib</AssemblyReference>
            <AssemblyReference>System.Data</AssemblyReference>
            <AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
            <AssemblyReference>System</AssemblyReference>
            <AssemblyReference>System.Drawing</AssemblyReference>
            <AssemblyReference>System.Core</AssemblyReference>
            <AssemblyReference>System.Xml</AssemblyReference>
            <AssemblyReference>System.Xml.Linq</AssemblyReference>
            <AssemblyReference>System.Xaml</AssemblyReference>
            <AssemblyReference>UiPath.System.Activities</AssemblyReference>
            <AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
        </sco:Collection>
    </TextExpression.ReferencesForImplementation>

<!-- 오류 Process.xaml 파일, 기록용 -->
  <TextExpression.NamespacesForImplementation>
    <sco:Collection x:TypeArguments="x:String">
      <x:String>System.Activities</x:String>
      <x:String>System.Activities.Statements</x:String>
      <x:String>System.Activities.Expressions</x:String>
      <x:String>System.Activities.Validation</x:String>
      <x:String>System.Activities.XamlIntegration</x:String>
      <x:String>Microsoft.VisualBasic</x:String>
      <x:String>Microsoft.VisualBasic.Activities</x:String>
      <x:String>System</x:String>
      <x:String>System.Collections</x:String>
      <x:String>System.Collections.Generic</x:String>
      <x:String>System.Data</x:String>
      <x:String>System.Diagnostics</x:String>
      <x:String>System.Drawing</x:String>
      <x:String>System.IO</x:String>
      <x:String>System.Linq</x:String>
      <x:String>System.Net.Mail</x:String>
      <x:String>System.Xml</x:String>
      <x:String>System.Xml.Linq</x:String>
      <x:String>UiPath.Core</x:String>
      <x:String>UiPath.Core.Activities</x:String>
      <x:String>System.Windows.Markup</x:String>
      <x:String>GlobalVariablesNamespace</x:String>
      <x:String>GlobalConstantsNamespace</x:String>
      <x:String>System.Reflection</x:String>
      <x:String>System.ComponentModel</x:String>
      <x:String>System.Runtime.Serialization</x:String>
      <x:String>System.Xml.Serialization</x:String>
      <x:String>System.Collections.ObjectModel</x:String>
    </sco:Collection>
  </TextExpression.NamespacesForImplementation>
  <TextExpression.ReferencesForImplementation>
    <scg:List x:TypeArguments="AssemblyReference" Capacity="31">
      <AssemblyReference>System.Activities</AssemblyReference>
      <AssemblyReference>Microsoft.VisualBasic</AssemblyReference>
      <AssemblyReference>System.Private.CoreLib</AssemblyReference>
      <AssemblyReference>System.Data</AssemblyReference>
      <AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
      <AssemblyReference>System</AssemblyReference>
      <AssemblyReference>System.Drawing</AssemblyReference>
      <AssemblyReference>System.Core</AssemblyReference>
      <AssemblyReference>System.Xml</AssemblyReference>
      <AssemblyReference>System.Xml.Linq</AssemblyReference>
      <AssemblyReference>System.Xaml</AssemblyReference>
      <AssemblyReference>UiPath.System.Activities</AssemblyReference>
      <AssemblyReference>UiPath.UiAutomation.Activities</AssemblyReference>
      <AssemblyReference>UiPath.Studio.Constants</AssemblyReference>
      <AssemblyReference>System.Reflection.DispatchProxy</AssemblyReference>
      <AssemblyReference>System.Reflection.TypeExtensions</AssemblyReference>
      <AssemblyReference>System.ObjectModel</AssemblyReference>
      <AssemblyReference>System.Reflection.Metadata</AssemblyReference>
      <AssemblyReference>System.ComponentModel.EventBasedAsync</AssemblyReference>
      <AssemblyReference>PresentationFramework</AssemblyReference>
      <AssemblyReference>System.ComponentModel.TypeConverter</AssemblyReference>
      <AssemblyReference>WindowsBase</AssemblyReference>
      <AssemblyReference>Microsoft.Win32.Primitives</AssemblyReference>
      <AssemblyReference>System.ComponentModel</AssemblyReference>
      <AssemblyReference>System.ComponentModel.Primitives</AssemblyReference>
      <AssemblyReference>System.Private.ServiceModel</AssemblyReference>
      <AssemblyReference>System.Runtime.Serialization.Formatters</AssemblyReference>
      <AssemblyReference>System.Private.DataContractSerialization</AssemblyReference>
      <AssemblyReference>System.Runtime.Serialization.Primitives</AssemblyReference>
      <AssemblyReference>System.Private.Xml</AssemblyReference>
    </scg:List>
  </TextExpression.ReferencesForImplementation>
profile
딸 바보, SYOON 사랑해, RPA 운영/개발 공유하고자 하는 사람. RPA와 연계 필요한 대상은 가리지 않고 습득한다는 마음으로

0개의 댓글