What are the challenges you face when working across database platforms? Take the survey

Generated executable causes ntdll.dll fault

If I build my code on a Windows 2016 or 2019 server with VS 2019 and the 7.5.1 SmartAssembly, everything works perfectly. I embed the referenced dlls and all is well in the world.
If I then try the same process on a Windows 2012 R2 server with VS 2019 and 7.5.1, the executable will not run and generates a fault in the ntdll.dll, version 6.3.9600.19678, Exception code 0xc00000fd, offset 0x0043062.
If I compile it with SmartAssembly, it runs perfectly so I can only assume that it is something that SmartAssembly is adding to the mix.
I have completely uninstalled VS2019 and all things RedGate before reinstalling them again but not change.
Any ideas on how to work out what is causing the problem?
Thanks in advance as I know someone will know the answer.


  • Options
    OK, Problem solved.
    Basically, SA was embedding the log4net assembly but within the SA configuration it was hiding this assembly saying that it couldn't be embedded; after expanding the list, you could see it was ticked but greyed out. 
    To resolve the problem, I had to manually edit the SA project file and set log4net to not be embedded. In my app, log4net is provided by an external application and is loaded dynamically.
    I think that this scenario could be classified as a bug because if an assembly is considered as not allowed to be embedded, SA should ensure that the assembly is actually not set to embed.
Sign In or Register to comment.