VisualStudio C# x64,为什么 AddReference 选项,.NET 选项卡指向 x86 DLL 而不是 x64? [英] VisualStudio C# x64, why AddReference option, .NET tab points to x86 DLL instead of x64?

查看:32
本文介绍了VisualStudio C# x64,为什么 AddReference 选项,.NET 选项卡指向 x86 DLL 而不是 x64?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个 x64 应用程序.

I want to create an x64 application.

当我想在选项卡 .NET 下的窗口 AddReference 中添加对 system.data 的引用时,我只看到 x86 DLL,我需要 64 位版本.

When I want to add a reference for example to system.data in window AddReference under tab .NET I see only x86 DLLs, and I need 64 bit versions.

我有 Windows Server 2008 x64 和 Visual Studio 2008.

I have Windows Server 2008 x64 with Visual Studio 2008.

我创建了一个项目并在配置管理器下设置了 x64.

I created a project and I set x64 under Configuration Manager.

我该怎么做才能强制 Visual Studio 指向正确的 DLL(来自 C:WINDOWSMicrosoft.NETFramework64 而不是C:WINDOWSMicrosoft.NETFramework)?

What can I do to force Visual Studio to point to the correct DLLs (from C:WINDOWSMicrosoft.NETFramework64 instead of C:WINDOWSMicrosoft.NETFramework)?

推荐答案

遇到了同样的问题,是的,我也认为这是 MS 的错误.您会认为 x64 或 x86 sgen.exe 都可以处理 msil 程序集,尤其是当您必须引用框架程序集时.

Running into the same problem, and yes I also consider it a bug from MS. You'd think either the x64 or x86 sgen.exe could handle msil assemblies, especially when you have to reference framework assemblies.

我更喜欢自己构建 msil 程序集,但将本地构建的 3rd 方程序集扔到我的组合中.当项目尝试使用 x86 sgen.exe 生成序列化程序集时,它抱怨第 3 方程序集格式错误".

I would prefer building msil assemblies myself, but have a native-built 3rd party assembly tossed into my mix. When the project tries to generate the serialization assemblies using the x86 sgen.exe, it complains that the 3rd party assembly is "the wrong format."

当我使用 x64 sgen.exe 时,它​​抱怨 System.Data 是错误的格式".但是我没有在 .csproj 文件中指向 Framework64 版本的选项.

When I use the x64 sgen.exe, it complains that System.Data is "the wrong format". But I don't have the option of pointing at the Framework64 version in the .csproj file.

这篇关于VisualStudio C# x64,为什么 AddReference 选项,.NET 选项卡指向 x86 DLL 而不是 x64?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆