c# - Save a dynamic assembly to file -
i've been trying hours on finding way save dynamic assembly (i have access assembly - of type 'assembly'). also, not have access byte array of assembly. i've looked around stackoverflow, search did not yield successful results.
for clarification:
// assembly (this example) assembly asm = somemethod(); // returns valid result // how go saving disk?
is possible save assembly of type assembly?
if so, how proceed accomplish this?
thanks in advance.
for people commenting "possible duplicate": duplicate, valid reason: answers on other threads not work - attempt revive topic low-quality answers.
this not work because answer not instantiate "results" , therefore cannot replicate solution.
assemblybuilder.save() not work because supposedly c# "cannot cast type assemblybuilder type assembly", though of other answers on here include solution.
did try using mono.cecil project? offers variety of apis inject il and/or edit code , can save assembly it. myself used in project , afaik question, on problem, too.
Comments
Post a Comment