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

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

问题描述

我有一个在这里工作的应用程序,该应用程序使用SharpSVN包装器来实现SVN。在过去的几年中,它为我们服务良好。但是,我们已经开始引入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.

我已经下载了SharpSVN dll的64位版本,我想知道下一步该怎么做。我无法阻止我的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应用程序是使用任何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天全站免登陆