fixed issue with Assembly.Location throwing#466
fixed issue with Assembly.Location throwing#466defr0zen wants to merge 1 commit intoAntaris:masterfrom
Conversation
matthid
left a comment
There was a problem hiding this comment.
Sorry for the late review, one smaller thing to change.
| { | ||
| return !a.IsDynamic && File.Exists(a.Location) && !a.Location.Contains(CompilerServiceBase.DynamicTemplateNamespace); | ||
| } | ||
| catch |
There was a problem hiding this comment.
Can you clarify which exception is thrown and only catch the specific one (and add a comment)?
Otherwise (if we want to catch all) we need some kind of logging here at the very least.
There was a problem hiding this comment.
In AF this part is throwing exception.
|
Guys any temp workaround till the time this pull is merged into the master? |
|
@shyamal890 Yes the assembly-resolver can be configured so you can just copy it to your code and configure it. |
|
@matthid I created a new cs file with the following code. However, |
|
when will this be merged? |
Basiclly this fixes my problem |
Assembly.Location could throw. In my case, I am trying to use RazorEngine in an Azure Function, which loads some native Edge dlls for JavaScript interop. These assemblies are loaded into the domain, however, calling Assembly.Location on them throws an exception.
I was thinking to use a custom resolver, however, this code is also used in the exceptions, and it is not trivial to use the custom resolver in the exception constructors. Hence such quick fix.