FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Added logic in AssemblyLoadContext to load assembly from GAC. by adityapatwardhan · Pull Request #3981 · PowerShell/PowerShell · GitHub

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

Merged
Dongbo Wang (daxian-dbw) merged 4 commits into
PowerShell:masterfrom
adityapatwardhan:FullClrAssemblyLoad
Jun 15, 2017
Merged

Added logic in AssemblyLoadContext to load assembly from GAC.#3981
Dongbo Wang (daxian-dbw) merged 4 commits into
PowerShell:masterfrom
adityapatwardhan:FullClrAssemblyLoad

Conversation

Aditya Patwardhan (adityapatwardhan) commented Jun 9, 2017
edited
Loading

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.

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member

Aditya Patwardhan (@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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think this is a typo: chosenVersionDirectory

Copy link
Copy Markdown
Member Author

Steve Lee (@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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

You still have to return null if UNIX right?

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.

Copy link
Copy Markdown
Member Author

Having a look at the test failure.

Copy link
Copy Markdown
Member Author

Steve Lee (@SteveL-MSFT) All comments / issues fixed. Please have a look.

Steve Lee (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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Copy link
Copy Markdown
Member Author

Dongbo Wang (@daxian-dbw) Can you also have a look. Thanks!

Copy link
Copy Markdown
Member

Looking now.

Dongbo Wang (daxian-dbw) merged commit 26a44ab into PowerShell:master Jun 15, 2017
Aditya Patwardhan (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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL