使用 32 位或 64 位 dll 编译 .net 应用程序 [英] compiling a .net application with either a 32-bit or 64-bit dll

查看:39
本文介绍了使用 32 位或 64 位 dll 编译 .net 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我们在工作中编写的应用程序,它使用 SVN 的 SharpSVN 包装器.在过去的几年里,它对我们很有帮助.但是,我们已经开始引入 64 位系统,我们的应用程序似乎无法访问这些系统上的 SharpSVN dll.

I have an application that we wrote here at work that uses the SharpSVN wrapper for SVN. It has served us well of the past few years. However, we have started bringing in 64-bit systems and our application cannot seem to access the SharpSVN dll on these systems.

我已经下载了 64 位版本的 SharpSVN dll,我想知道下一步该怎么做.我无法阻止我的 32 位用户使用该应用程序,因此我需要能够为两个平台进行编译.幸运的是,在此应用程序中,我们将 ntier 堆栈的不同层拆分为解决方案中的单独项目,因此我使用 SharpSVN dll 的业务层是独立的.

I have downloaded the 64-bit version of the SharpSVN dll and I am wondering what to do next. I cannot stop my 32-bit users from using the application, so I need to be able to compile for both platforms. Luckily, with this application, we split different layers of the ntier stack into separate projects within the solution so my business layer that utilizes the SharpSVN dll is on its own.

如何在无需维护项目的两个副本的情况下编译 32 位和 64 位版本的应用程序?

How would I go about compiling both a 32-bit and 64-bit version of my application without having to maintain two copies of the project?

推荐答案

从描述来看,听起来您的 vb.net 应用程序是使用 Any CPU 选项构建的,这意味着它可以作为64 位机器上的 64 位应用程序.在这种情况下,它不会加载 32 位 DLL.

From the description, it sounds like your vb.net application is built with the Any CPU option, which means it would run as a 64-bit application on a 64-bit machine. In that case, it would not load the 32-bit DLL.

与其尝试同时使用 32 位和 64 位版本,不如将其更改为以 32 位运行.更简单的部署.在项目属性构建选项卡下,选择 x86.

Rather than try to use both a 32-bit and 64-bit version, you should be able to just change it to run as 32-bit. Simpler deployment. Under the project properties build tab, choose x86.

这篇关于使用 32 位或 64 位 dll 编译 .net 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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