Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Added logic in AssemblyLoadContext to load assembly from GAC.#3981

Merged
daxian-dbw merged 4 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
adityapatwardhan:FullClrAssemblyLoadadityapatwardhan/PowerShell:FullClrAssemblyLoadCopy head branch name to clipboard
Jun 15, 2017
Merged

Added logic in AssemblyLoadContext to load assembly from GAC.#3981
daxian-dbw merged 4 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
adityapatwardhan:FullClrAssemblyLoadadityapatwardhan/PowerShell:FullClrAssemblyLoadCopy head branch name to clipboard

Conversation

@adityapatwardhan

@adityapatwardhan adityapatwardhan commented Jun 9, 2017

Copy link
Copy Markdown
Member

Fixes #2592

When Resolve method is not able to find the assembly, we try to look it up from GAC.
If found, the assembly is loaded and cached.
There is a TestHook to disable GAC loading, but it is enabled by default.

@adityapatwardhan

Copy link
Copy Markdown
Member Author

Rebasing did not get rid of the changes in test unrelated to this commit.

@SteveL-MSFT

Copy link
Copy Markdown
Member

@adityapatwardhan if you click the TestCases tab, the test failure is your new test loading PSScheduledJob module. The other error output isn't fatal and fixed by #3968

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

convention is to use leading underscore for private fields

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wouldn't it be better to #ifdef !UNIX line 265 (calling this method) above as well as this whole method?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is a typo: chosenVersionDirectory

@adityapatwardhan

Copy link
Copy Markdown
Member Author

@SteveL-MSFT Fixed all CR comments.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You still have to return null if UNIX right?

@daxian-dbw daxian-dbw self-assigned this Jun 12, 2017
When Resolve method is not able to find the assembly, we try to look it up from GAC.
If found, the assembly is loaded and cached.
There is a TestHook to disable GAC loading, but it is enabled by default.
@adityapatwardhan

Copy link
Copy Markdown
Member Author

Having a look at the test failure.

@adityapatwardhan

Copy link
Copy Markdown
Member Author

@SteveL-MSFT All comments / issues fixed. Please have a look.

@SteveL-MSFT SteveL-MSFT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@adityapatwardhan

Copy link
Copy Markdown
Member Author

@daxian-dbw Can you also have a look. Thanks!

@daxian-dbw

Copy link
Copy Markdown
Member

Looking now.

@daxian-dbw daxian-dbw merged commit 26a44ab into PowerShell:master Jun 15, 2017
@adityapatwardhan adityapatwardhan deleted the FullClrAssemblyLoad branch June 15, 2017 20:28
/// <summary>
/// Test hooks for PowershellAssemblyLoadContext
/// </summary>
public static class PowerShellAssemblyLoadContextTestHooks

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We have public static class InternalTestHooks for test hooks.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@iSazonov That is in a different assembly, so could not re-use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.