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

Have the possibility to make sure that .Net won't load any (deprecated) dll located in the application folder #26

Closed
AlexandreDeRiemaecker opened this issue Aug 15, 2013 · 2 comments

Comments

@AlexandreDeRiemaecker
Copy link

The application has been once deployed without using Costura and a reference assembly has been updated in the meantime. We now deploy our (fully managed code) application, thanks to costura, using a single .exe. Because we cannot delete the old dlls in the folder, costura cannot work correctly.

The problem that arise is that the .Net Framework doesn't give a chance for Costura to intervene, since AppDomain.AssemblyResolve isn't called, because it picks the existing dll in the application folder. Then, if the assembly has a strong name, it will throw an Exception because of version mismatch, and if not it will simply use the older version.

The application is autoupdated on system we don't have access to, and the autoupdater can't be extended to remove the old files.

If possible, I would like to contribute to this project by implementing the solution to this problem, however I failed at some attempts to solve it (tried this by doing what costura does manually without weaving). Any idea would be welcome.

@SimonCropp
Copy link
Member

@riemaecker the root of this problem is that you are not doing a clean deploy. While appreciate the offer to contribute I am not sure this is a problem that costura should be solving.

@distantcam thoughts?

@distantcam
Copy link
Member

Yeah unfortunately if the CLR finds the assembly it thinks it needs on disk then the appdomain never raises the ResolveAssemblyReference event.

The only way around this is to change the name or version you're looking for. If you can't do that you're stuck.

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

No branches or pull requests

3 participants