Skip to content

Fix Assembly.LoadFrom resolver#67890

Merged
jkotas merged 1 commit intodotnet:mainfrom
jkotas:LoadFileResolver
Apr 12, 2022
Merged

Fix Assembly.LoadFrom resolver#67890
jkotas merged 1 commit intodotnet:mainfrom
jkotas:LoadFileResolver

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Apr 12, 2022

Path.GetFullPath fails on empty path. Check for empty requestor path earlier.

Fixes #67802

Path.GetFullPath fails on empty path. Check for empty requestor path earlier.

Fixes dotnet#67802
@ghost ghost assigned jkotas Apr 12, 2022
@ghost
Copy link

ghost commented Apr 12, 2022

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

Issue Details

Path.GetFullPath fails on empty path. Check for empty requestor path earlier.

Fixes #67802

Author: jkotas
Assignees: -
Labels:

area-System.Reflection.Emit

Milestone: -

@jkotas
Copy link
Member Author

jkotas commented Apr 12, 2022

I was not able to create a test that would simulate the situation hit in #67802 (comment) where Reflection.Emit assembly is not able to find its references. It probably requires some combination of AssemblyLoadContexts to hit.

@ghost
Copy link

ghost commented Apr 12, 2022

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

Path.GetFullPath fails on empty path. Check for empty requestor path earlier.

Fixes #67802

Author: jkotas
Assignees: jkotas
Labels:

area-System.Reflection.Emit, area-AssemblyLoader-coreclr

Milestone: -

Copy link
Member

@vitek-karas vitek-karas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@jkotas jkotas merged commit 47876c6 into dotnet:main Apr 12, 2022
@jkotas jkotas deleted the LoadFileResolver branch April 12, 2022 16:38
@ghost ghost locked as resolved and limited conversation to collaborators May 12, 2022
@dotnet dotnet unlocked this conversation Jun 10, 2022
@agocke
Copy link
Member

agocke commented Jun 10, 2022

/backport to release/6.0

@github-actions
Copy link
Contributor

@ghost ghost locked as resolved and limited conversation to collaborators Jul 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The dynamic type created is thrown FileLoadException when using the GetCustomAttributes method

3 participants