view raw
shad0wk shad0wk - 9 months ago 91
C# Question

Referencing Shell32.dll?

I don't have .NET 4.5 to unzip zip files, so I'm using

like this. But when I reference the dll like this:

csc.exe /r:"C:\Windows\System32\shell32.dll" ...

I get this error:

fatal error CS0009: Metadata file 'c:\Windows\System32\shell32.dll' could not be opened -- 'An attempt was made to load
a program with an incorrect format. '

War War

Possibly because you are trying to reference it like a .NET assembly.

I would try to include the assembly using the /lib: argument instead as per...

/lib:dir1[,dir2] Compiler option.