Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/267.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 参考Shell32.dll并编译为x64?_C#_.net_Visual Studio 2010_64 Bit - Fatal编程技术网

C# 参考Shell32.dll并编译为x64?

C# 参考Shell32.dll并编译为x64?,c#,.net,visual-studio-2010,64-bit,C#,.net,Visual Studio 2010,64 Bit,我需要获取文件属性,特别是“产品版本”,我使用的是Shell32。它在x86中运行良好,但当我尝试编译为x64时,会出现以下错误: 必须指定一个与输入类型库兼容的有效计算机类型 我猜这是因为我使用32位VisualStudio进行编译。我不能用任何CPU代替x64 有什么想法吗?您可能在引用x86 Shell32。在x64计算机上,您可以在%windir%\SysWOW64中找到x86外壳32,在%windir%\System32中找到x64版本。 有一个很好的小页面可能会有所帮助。我确实尝试过

我需要获取文件属性,特别是“产品版本”,我使用的是Shell32。它在x86中运行良好,但当我尝试编译为x64时,会出现以下错误:

必须指定一个与输入类型库兼容的有效计算机类型

我猜这是因为我使用32位VisualStudio进行编译。我不能用任何CPU代替x64


有什么想法吗?

您可能在引用x86 Shell32。在x64计算机上,您可以在%windir%\SysWOW64中找到x86外壳32,在%windir%\System32中找到x64版本。
有一个很好的小页面可能会有所帮助。

我确实尝试过,但参考总是根据我假设的注册表中的互操作信息切换到x86版本。可能重复