c# - Nancy Module Autodiscovering not Working after ILMerge -


whe run nancy selfhosted application in visual studio works expected when use ilmerge create allinone.exe 404s on every url.

thats ilmerge command:

ilmerge.exe /target:console /out:allinone.exe application.exe "nancy.hosting.self.dll" "nancy.dll" 

the problem none of modules autodiscovered , therefore no routes avalaible. problem occurs in merged exe file. when run application.exe in /bin/release works.

best regards

by default not scan assembly "nancy" in (which nancy.dll). you've merged them going exclude entire merged assembly. can change behavior overriding method doesn't exclude nancy assembly (the true flag in typesof call)

https://github.com/nancyfx/nancy/blob/master/src/nancy/bootstrapper/nancybootstrapperbase.cs#l94


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -