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

iOS: AssemblyDefinition.MainModule.FileName is not set #1313

Closed
rolfbjarne opened this issue Jul 6, 2020 · 1 comment · Fixed by #1857
Closed

iOS: AssemblyDefinition.MainModule.FileName is not set #1313

rolfbjarne opened this issue Jul 6, 2020 · 1 comment · Fixed by #1857

Comments

@rolfbjarne
Copy link
Member

For xamarin-macios, we need the original filename used to load an assembly (because we need to look for specific resources next to that assembly).

However, the AssemblyDefinitions that we get in our custom steps don't have AssemblyDefinition.MainModule.FileName set, which complicates things. It seems like a result of this change: f5a9875

A possible solution could be to make https://github.com/mono/linker/blob/da2cc0fcd6c3a8e8e5d1b5d4a655f3653baa8980/src/linker/Linker/AssemblyResolver.cs#L88 accessible from custom steps.

@MichalStrehovsky
Copy link
Member

We should make GetAssemblyFileName a public API.

ModuleDefinition.FileName is a useless API because Cecil doesn't provide means to make it work with any other backing streams than a FileStream and FileStream is a bad choice perf-wise.

rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 5, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 5, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 6, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 7, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 7, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 7, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 7, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 10, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 11, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 14, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to rolfbjarne/xamarin-macios that referenced this issue Aug 14, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to xamarin/xamarin-macios that referenced this issue Aug 14, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
rolfbjarne added a commit to xamarin/xamarin-macios that referenced this issue Aug 14, 2020
… assembly doesn't have a filename.

In .NET AssemblyDefinitions don't have MainModule.FileName set, because they're not
loaded using FileStreams.

Ref: dotnet/linker#1313
@marek-safar marek-safar added this to the .NET 6.0 milestone Nov 13, 2020
marek-safar added a commit to marek-safar/linker that referenced this issue Mar 1, 2021
agocke pushed a commit to dotnet/runtime that referenced this issue Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants