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

Add AssemblyResolve handler for in-memory assemblies in CodeTaskFactory #1486

Merged
merged 2 commits into from Dec 18, 2016

Conversation

jeffkl
Copy link
Contributor

@jeffkl jeffkl commented Dec 15, 2016

We know that since the assembly is loaded via Assembly.Load(byte[]), it is not allowed to use loaded dependencies because they came from a different load context. This change keeps a static dictionary around with a mapping of assembly strong name and assembly. If the inline task asks for the dependency at run time, the assembly resolve handler will return the loaded assembly if the strong name is the same.

Users will still experience runtime exceptions if they only list top-level dependencies in their <Reference /> list. To get around this, they'll need to list the full closure of dependencies that are not in the GAC or the MSBuild.exe directory.

Closes #594

@AndyGerlicher AndyGerlicher merged commit 2021769 into dotnet:xplat Dec 18, 2016
@jeffkl jeffkl deleted the 954-inlinetask branch December 20, 2016 00:12
@am11 am11 mentioned this pull request Jan 19, 2017
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.

None yet

4 participants