"Bad IL Format" error occurred during the project publish (Legacy to Windows Migration)

An error occurred while publishing a windows project.

Detailed Issue details:

C:\Users\__\.nuget\packages\UiPath.emgucvbundle\1.1.0\lib/net5.0/msvcp140_1.dll’ is invalid.
[Error] Unexpected error has occurred during the library compilation process: The assembly compilation returned the following errors: *
Error CS0101: The namespace ‘’ already contains a definition for ‘Process’
Warning CS0618: ‘Office365ApplicationScope.Tenant’ is obsolete: ‘Use the TenantId property instead’ *
Warning CS0618: ‘Office365ApplicationScope.Services’ is obsolete: ‘Use the AuthenticationScopes parameter instead’ *
Warning CS0618: ‘Office365ApplicationScope.OAuth2Username’ is obsolete: ‘Use the EmailAddress property instead’ *
Warning CS0618: ‘Office365ApplicationScope.Tenant’ is obsolete: ‘Use the TenantId property instead’ *
Warning CS0618: ‘Office365ApplicationScope.Services’ is obsolete: ‘Use the AuthenticationScopes parameter instead’ *
Warning CS0618: ‘Office365ApplicationScope.OAuth2Username’ is obsolete: ‘Use the EmailAddress property instead’

If you encounter this issue while publishing a Windows project, you can resolve it by following these steps:

  • Start by checking the project folder structure.
  • In my case, as shown in the screenshot below, the Process.xaml file was initially located inside the Process folder. To resolve the issue, I moved the Process.xaml file out of the Process folder and then deleted the unnecessary Process folder.
    image

While this issue does not occur when publishing project in the Legacy, it seems to be present in the windows project

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.