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

Loading dynamic assemblies fails with 'System.NotSupportedException' #46

Open
GoogleCodeExporter opened this issue May 26, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What version of the MyBatis.NET are you using?
I use iBatis.NET 1.6.2

Problem:
I have embedded providers tag in my SqlMap.config.
<providers embedded="ProjectName.providers.config"/>
I can't be replaced with following tag because of external requirements:
<providers embedded="providers.config, ProjectName"/>

With that specified iBatis should look for providers.config file by iterating 
through all assemblies. (Utilities\Resources.cs:438)
That worked on machines with .NET prior to 4.0

After moving to .NET framework >4 when iBatis code loads providers, following 
exception is thrown: 'System.NotSupportedException'. GetAssemblies does not 
only return dynamic assemblies.
This issue is related to CLR that runs our application.

This issue is also described here: 
http://bloggingabout.net/blogs/vagif/archive/2010/07/02/net-4-0-and-notsupported
exception-complaining-about-dynamic-assemblies.aspx

Expected output:
File providers.config is loaded successfully.


Original issue reported on code.google.com by [email protected] on 15 Mar 2013 at 6:52

@GoogleCodeExporter
Copy link
Author

I wrote that I use iBatis.NET 1.6.2 but related code in myBatis.NET remains 
unchanged also.

Original comment by [email protected] on 15 Mar 2013 at 7:00

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

No branches or pull requests

1 participant