Closed msmolka closed 2 years ago
Hi @msmolka , how do you load your assemblies?
In cases where many third-party dependencies are loaded, it is not a good idea to fully load all of them, since it might take a while. As long as the recursive parameter in the LoadAssemblyIncludingDependencies is not set, it would only load direct dependencies and create stubs for all the others. -> does the test work if you set this recurse parameter?
Best Regards, Florian
Whole my code is above. How can I modify it to load assembles?
Classes(true)
and
protected static readonly Architecture Architecture = new ArchLoader().LoadAssembliesIncludingDependencies(typeof(User).Assembly).Build();
also not working.
Including deps is teribly slow. And was not needed on version 0.9. But even including is not working. Version 0.9 works 0.10 not
With version 0.10 the default behaviour for string matching was changed. Previously
DependOnAny("Microsoft.EntityFrameworkCore")
found all types which had a dependency to a type with Microsoft.EntityFrameworkCore
contained in it's full name. Now it only find dependencies to types with the exact full name Microsoft.EntityFrameworkCore
. The same is true for all other methods which use strings as matching parameters. You can specify to use regex instead if you want to match parts of the full name:
DependOnAny("Microsoft.EntityFrameworkCore", useRegularExpressions:true)
Maybe this is the reason the behaviour of your rule changed?
Looks working now
I have test:
That is properly failing in version 0.9.1 but passing in version 0.10+