Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@sdmaclea
Copy link

Assembly.LoadFromPartialName(string) should not throw FileNotFoundException
rather it should return null.

Fixes #19817

Assembly.LoadFromPartialName(string) should not throw FileNotFoundException
rather return null.

Fixes #19817
@sdmaclea sdmaclea self-assigned this Apr 11, 2019
@sdmaclea sdmaclea added this to the 3.0 milestone Apr 11, 2019
@sdmaclea
Copy link
Author

I plan to add xunit tests to corefx

@sdmaclea sdmaclea requested a review from vitek-karas April 11, 2019 23:12
@sdmaclea
Copy link
Author

test Ubuntu x64 Formatting
test Windows_NT x64 Release CoreFX Tests
test Ubuntu x64 Checked CoreFX Tests

@sdmaclea sdmaclea merged commit daa688d into dotnet:master Apr 12, 2019
@sdmaclea sdmaclea deleted the Fix19817 branch April 12, 2019 03:49
throw new ArgumentNullException(nameof(partialName));

return Load(partialName);
if ((partialName.Length == 0) || (partialName[0] == '\0'))
Copy link
Member

Choose a reason for hiding this comment

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

string.IsNullOrEmpty

Copy link
Member

Choose a reason for hiding this comment

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

Also - I think the Length will be zero if the first character is the nul terminator.

Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corefx that referenced this pull request Apr 12, 2019
Assembly.LoadFromPartialName(string) should not throw FileNotFoundException, but
should rather return null.

ArgumentException should use nameof(partialName)

Fixes #19817

Signed-off-by: dotnet-bot <[email protected]>
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corert that referenced this pull request Apr 12, 2019
Assembly.LoadFromPartialName(string) should not throw FileNotFoundException, but
should rather return null.

ArgumentException should use nameof(partialName)

Fixes #19817

Signed-off-by: dotnet-bot <[email protected]>
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/mono that referenced this pull request Apr 12, 2019
Assembly.LoadFromPartialName(string) should not throw FileNotFoundException, but
should rather return null.

ArgumentException should use nameof(partialName)

Fixes mono#19817

Signed-off-by: dotnet-bot <[email protected]>
marek-safar pushed a commit to mono/mono that referenced this pull request Apr 12, 2019
Assembly.LoadFromPartialName(string) should not throw FileNotFoundException, but
should rather return null.

ArgumentException should use nameof(partialName)

Fixes #19817

Signed-off-by: dotnet-bot <[email protected]>
Dotnet-GitSync-Bot pushed a commit to Dotnet-GitSync-Bot/corert that referenced this pull request Apr 12, 2019
Assembly.LoadFromPartialName(string) should not throw FileNotFoundException, but
should rather return null.

ArgumentException should use nameof(partialName)

Fixes #19817

Signed-off-by: dotnet-bot <[email protected]>
GrabYourPitchforks pushed a commit to dotnet/corefx that referenced this pull request Apr 12, 2019
Assembly.LoadFromPartialName(string) should not throw FileNotFoundException, but
should rather return null.

ArgumentException should use nameof(partialName)

Fixes #19817

Signed-off-by: dotnet-bot <[email protected]>
jkotas pushed a commit to dotnet/corert that referenced this pull request Apr 14, 2019
Assembly.LoadFromPartialName(string) should not throw FileNotFoundException, but
should rather return null.

ArgumentException should use nameof(partialName)

Fixes #19817

Signed-off-by: dotnet-bot <[email protected]>
davmason pushed a commit to davmason/coreclr that referenced this pull request Apr 27, 2019
Assembly.LoadFromPartialName(string) should not throw FileNotFoundException, but 
should rather return null.

ArgumentException should use nameof(partialName)

Fixes #19817
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Assembly.LoadFromPartialName(string) should not throw FileNotFoundException, but 
should rather return null.

ArgumentException should use nameof(partialName)

Fixes dotnet/coreclr#19817



Commit migrated from dotnet/coreclr@daa688d
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LoadWithPartialName should not throw according to documentation

2 participants