添加参考时,最终用户是否必须安装参考? [英] When you add references, do the end users have to have the references installed?

查看:83
本文介绍了添加参考时,最终用户是否必须安装参考?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这听起来像是一个愚蠢的问题,但希望有人可以为我澄清这个问题.

假设您添加了对VB.NET应用程序的引用.
(例如Microsoft.DirectX.AudioVideoPlayback.dll)

用户(一旦构建并部署了应用程序)是否必须在其计算机上安装某个DirectX版本,如果是,则是哪个版本?是否取决于SDK版本?

还建议您使用DirectX或Windows Media Player播放各种媒体声音吗?

This may sound like a stupid question, but hopefully somebody can clarify this issue for me.

Say if you add a reference to your VB.NET application.
(e.g. Microsoft.DirectX.AudioVideoPlayback.dll )

Does the user (once the application has been built and deployed) have to have a certain DirectX version installed on their machine, and if so what version? Does it depend on the SDK version?

Also would you recommend using DirectX or Windows Media Player for playing a wide range of media sounds?

推荐答案

将dll添加到项目中并要部署时如果将应用程序转移到另一台计算机上,则该dll必须位于GAC或bin中.以下是有关如何将dll放入垃圾箱(称为垃圾箱部署)的说明:

http://msdn.microsoft.com/en-us/library/t1zz5y8c.aspx [ ^ ]

但是,这仅对很少依赖文件的文件有效.例如,您不能bin部署.NET 4.0.甚至bin部署MVC3也会很棘手,如您在此处看到的那样:

http://www.hanselman.com/blog/BINDeployingASPNETMVC3 ... [
When you add a dll to your project and you want to deploy your application to another machine, that same dll has to be in the GAC or in the bin. Here are instructions on how to put your dll in the bin (this is called a bin deploy):

http://msdn.microsoft.com/en-us/library/t1zz5y8c.aspx[^]

However, this only works well for files that have very little in the way of dependencies. You cannot, for instance, bin deploy .NET 4.0. Even bin deploying MVC3 can be tricky, as you can see here:

http://www.hanselman.com/blog/BINDeployingASPNETMVC3...[^]

Your best solution, in almost all cases, is to have framework and system dlls installed the right way in the GAC. The DirectX dlls are in that category.

As for Windows Media versus DirectSound, I would say that depends on what you are most comfortable with. I am not terribly familiar with using the two, but I believe Windows Media uses DirectSound so there shouldn''t be a difference between the two as far as what they can play.


这篇关于添加参考时,最终用户是否必须安装参考?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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