Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommandLine.dll: Internal assembly name doesn't match the assembly name #92767

Open
kotlarmilos opened this issue Sep 28, 2023 · 2 comments
Open
Labels
area-Infrastructure-mono needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration
Milestone

Comments

@kotlarmilos
Copy link
Member

Description

There is a mismatch between the InternalName and OriginalFilename values in the assembly and its actual name. While it's expected to be CommandLine.dll, it is commandline.dll.

Here are details from the assembly:

�FileVersion2.0.275.0@��InternalNamecommandline.dll(��LegalCopyright H��OriginalFilenamecommandline.dll4��ProductVersion2.0.275<
�Assembly Version2.0.275.0à�Ä6

This mismatch causes a runtime issue in Mono embedding scenarios on apple mobile platforms. When the assembly is referenced by another, it cannot be loaded, resulting in the error:

Failed to load AOT module 'aot-instances' while running in aot-only mode because a dependency cannot be found or it is out of date.

Repro steps

Mismatch in Assembly and OriginalFilename Causes Runtime Issue in Mono Embedding on Apple Mobile Platforms

  1. Build the repository:
./build.sh mono+libs -os ios -arch arm64
  1. Compile the tests:
./src/tests/build.sh  ci os ios arm64 Debug -mono tree baseservices/mono /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:MonoForceInterpreter=false /p:LibrariesConfiguration=Debug /bl

Workaround

If the assembly is not used, the parameter /p:PublishTrimmed=true should be passed to remove the assembly from the app bundle.

An alternative is to pass the --aot-lazy-assembly-load runtime parameter, which shouldn't load all referenced assemblies during the startup. However, if the the referenced assembly is used, the runtime will abort because these kinds of errors can only be handled when loading the AOT image, not later.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 28, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Sep 28, 2023
@ghost
Copy link

ghost commented Sep 29, 2023

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

There is a mismatch between the InternalName and OriginalFilename values in the assembly and its actual name. While it's expected to be CommandLine.dll, it is commandline.dll.

Here are details from the assembly:

�FileVersion2.0.275.0@��InternalNamecommandline.dll(��LegalCopyright H��OriginalFilenamecommandline.dll4��ProductVersion2.0.275<
�Assembly Version2.0.275.0à�Ä6

This mismatch causes a runtime issue in Mono embedding scenarios on apple mobile platforms. When the assembly is referenced by another, it cannot be loaded, resulting in the error:

Failed to load AOT module 'aot-instances' while running in aot-only mode because a dependency cannot be found or it is out of date.

Repro steps

Mismatch in Assembly and OriginalFilename Causes Runtime Issue in Mono Embedding on Apple Mobile Platforms

  1. Build the repository:
./build.sh mono+libs -os ios -arch arm64
  1. Compile the tests:
./src/tests/build.sh  ci os ios arm64 Debug -mono tree baseservices/mono /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:MonoForceInterpreter=false /p:LibrariesConfiguration=Debug /bl

Workaround

If the assembly is not used, the parameter /p:PublishTrimmed=true should be passed to remove the assembly from the app bundle.

An alternative is to pass the --aot-lazy-assembly-load runtime parameter, which shouldn't load all referenced assemblies during the startup. However, if the the referenced assembly is used, the runtime will abort because these kinds of errors can only be handled when loading the AOT image, not later.

Author: kotlarmilos
Assignees: -
Labels:

area-System.Runtime, untriaged, needs-area-label

Milestone: -

@vcsjones vcsjones removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 3, 2023
@tannergooding tannergooding added needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration and removed untriaged New issue has not been triaged by the area owner labels Jun 24, 2024
Copy link
Contributor

Tagging subscribers to this area: @directhex, @matouskozak
See info in area-owners.md if you want to be subscribed.

@kotlarmilos kotlarmilos added this to the Future milestone Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Infrastructure-mono needs-further-triage Issue has been initially triaged, but needs deeper consideration or reconsideration
Projects
None yet
Development

No branches or pull requests

5 participants