10000 GH48 - Support additional assembly loading by adamklein · Pull Request #49 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content

GH48 - Support additional assembly loading #49

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

Closed
wants to merge 1 commit into from
Closed

GH48 - Support additional assembly loading #49

wants to merge 1 commit into from

Conversation

adamklein
Copy link

This solves my problem. Are there any obvious issues?

@adamklein
Copy link
Author

References #48

@adamklein
Copy link
Author

Further explanation why this is necessary:

Loading assemblies with Assembly.Load(byte[]) that contain unmanaged code in not supported

http://stackoverflow.com/questions/2945080/how-do-i-dynamically-load-raw-assemblies-that-contains-unmanaged-codebypassing

This is what is breaking my Load(), not the fact that ResolveHandler mangles the assembly name... but I think what I've added is sane anyway ... I have a dependency on a mixed assembly that won't load; only LoadFrom() works as a fallback ...

@adamklein
Copy link
Author

Hmm, I think the Travis CI failure error is a false positive.

Btw, using fuslogvw.exe, the error is traceable to:

ERR: Unrecoverable error occurred during pre-download check (hr = 0x80070002).

What makes this especially insidious is it appears to AddReference correctly, not reporting any errors, only to have no namespaces be visible in python... do we really need that catch {} ?

@davidanthoff
Copy link
Contributor

Yes, the failure on Python 2.6 looks weird. @ton 8000 yroberts?

I've pushed your branch onto this main repo to trigger an appveyor Windows build (there was a setting missing, I think in the future PRs should trigger this automatically, like it does with Travis).

@davidanthoff
Copy link
Contributor

This also breaks the Windows build, again the Python 2.6 version:

https://ci.appveyor.com/project/davidanthoff/pythonnet/build/2.0.0.25/job/2gc6r888yb5hvd9o

I don't know the code well enough to figure out what is going on, though.

@tonyroberts
Copy link
Contributor

It looks like the same problem that the change I made to load the assemblies differently was to try and fix. What was happening then was that the python runtime ended up getting loaded twice, once by clr.pyd and then again by any other assembly that referenced it.

I'll take a look at this later today - I hadn't anticipated that loading the assembly that way would break some assemblies. Probably the thing to do will be to revert those changes I made and fix the original problem another way.

@tonyroberts
Copy link
Contributor

This issue should now be fixed in #50.
@adamklein could you take a look and confirm when you get a chance?

tonyroberts added a commit that referenced this pull request Jun 9, 2014
@tonyroberts
Copy link
Contributor

Fixed in #50

@tonyroberts tonyroberts closed this Jun 9, 2014
twastvedt pushed a commit to autodesk-forks/pythonnet that referenced this pull request Mar 17, 2025
* add extensions support

* Update CHANGELOG.md

* handle python err
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.

3 participants
0