I have C# VS 2010 project which uses Shell32.dll. Shell32.dll is used for creating zip file. The machine is Win7 64-bit. The projects compile and runs fine when .net target version is 2.0 or 3.5. However changing it to 4.0 results in compilation failure. I tried by removing & adding refernce to Shell32.dll again and changing the target platform as X86. But still failed to compile. Looking for reason & resolution.
Update: I tried creating new project and added reference to Shell32.dll. This time I refered the dll from C:\Windows\SysWOW64 insted of C:\Windows\System32. Now this time it compiled fine. But I am not sure if this project will run on 32-bit windows and XP and other versions.