mrpmorris/blazor-validation

Add specific validators

michael-schleger opened this issue · 4 comments

Is it at all possible to specify validators rather than using reflection to scan assemblies? Doesn't appear to be. Reflection is causing other referenced assemblies to be loaded in to the app domain that are not otherwise used by my blazor app. Thanks.

Thanks for the response. Yes I understand, but Assembly.GetTypes() can cause other assemblies to be loaded, which may not be available.

This blog details the issue - https://weblog.west-wind.com/posts/2016/dec/12/loading-net-assemblies-out-of-seperate-folders

"However, .NET only looks for dependencies in the startup folder or any additionally declared Private Bin paths. I don't have those, so the asm.GetTypes() in many cases causes assembly load failures."

In my case the assemblies .NET is trying to load are not ones I wish to deploy with the blazor app, so they don't exist. It's ok if specific validators are not currently supported, I'll just need to restructure my solution. Thx.

Why does your client indirectly reference libraries that aren't on the client?

Shared project. Client references it but doesn't use everything in it.