The application need to use COM reference Microsoft Shell Control And Automation
, which is located at C:\Windows\system32\shell32.dll
But after adding its reference, VS 2010 added a dll Interop.Shell32.DLL
in target build directory. Everything working fine. But when builing MSI setup wizard project. It adds shell32.dll
as dependency. Alright, No problem.
But when install, it also copies shell32.dll
along with Interop.Shell32.DLL
in target installation directory, now when application runs it shows strange errors. But if I manually delete shell32
from installation directory, everything works fine.
Why MSI is copying shell32.dll
in installation directory ? Is it required for 64-bit OS ? If yes, whyInterop.Shell32.DLL
?
For my app, shell32.dll
seems to be problem, Is there a way I can avoid it being copied ?
Edit:
I excluded shell32.dll
from setup project, will it be problem in 64bit OS ?
Edit2:
shell32.dll
at C:\Windows\system32\
is actually 5KB but MSI copies 11 MB one. What is it ?