引用的DLL不beeing复制到引用项目 [英] Referenced DLL not beeing copied to referencing project

查看:171
本文介绍了引用的DLL不beeing复制到引用项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题可能已被要求多次,也许我只是不善于使用搜索功能在这里藏汉如谷歌,但我还没有找到一个答案,这个问题作为呢。

This question might have been asked multiple times and maybe I'm just bad at using the search functions here aswell as google but I've not found an answer to this question as of yet.

我目前有两个项目,项目X,项目Y和项目Z(其中仅持有映射)

I've currently got two projects, project X, project Y and project Z (which only holds the mappings)

X计划是持有我sessionfactories和这样的事情一个FluentNhibernate项目。所以,这也是该映射的加载和东西(这是很重要的,我怀疑这可能是整个原因,我有问题)

Project X is a FluentNhibernate project which holds my sessionfactories and things like this. So this is also where the mappings are loaded and things (this is important and i suspect it might be the whole reason for the problem I'm having)

现在的X项目,我引用了使用Microsoft.SqlServer.Types.dll组装。

Now in Project X I've referenced an assembly that uses Microsoft.SqlServer.Types.dll.

项目Y是它使用X计划为它的数据库连接的服务。

Project Y is a service which uses project X for it's database connections.

所有probjects建立发现和我的开发机器的完美运行,但在部署到我们的服务器,他们没能发挥作用(运行时错误)。错误是pretty的晦涩难懂,因为它指出了一个失踪FluentNHibernate组件,情况并非如此。

All probjects build find and run perfectly on my development machine, however when deployed to our server they failed to function (runtime errors). The error was pretty obscure since it pointed to a missing FluentNHibernate assembly which was not the case.

Procmon.exe幸运的是显示了code试图加载它,因为服务器没有安装SQL Server(我的客户不任Microsoft.SqlServer.Types.dll但其中最有可能具有一定的管理工作室安装此.DLL藏汉)。

Procmon.exe luckily showed the code trying to load the Microsoft.SqlServer.Types.dll which since the server does not have SQL Server installed (my client doesn't either but it has a management studio which most likely installs this .DLL aswell).

到目前为止好,复制的DLL了,它的工作(耶!)。

So far so good, copied the DLL over and it worked (yay!).

现在我想我会添加组件项目X,以确保这一参考使用项目十,这并没有发生复制到其他项目....所以我试图设置复制本地设置为true。

Now I figured i'd add the assembly to project X to make sure that this reference is copied over to other projects using project X. This didn't happen.... So i tried setting the 'Copy Local' setting to true.

可悲的是这仍然没有.dll文件复制到引用的项目年。

Sadly this still does not copy the .dll to the referencing project Y.

有没有办法做到这一点,或者这是Visual Studio的beeing巧妙,实现项目ÿ不需要此.dll文件,从而拒绝其复制过来?

Is there a way to make this happen or is this Visual Studio beeing clever and realizing Project Y doesn't need this .dll and thus refusing to copy it over?

(由于项目ž需要实际的参考和X项目加载此装配@运行时没有Z和X之间的硬的参考)

(Since Project Z needs the actual reference and Project X loads this assembly @ run time there is not 'hard' reference between Z and X)

难道任何天才#1揭示出这个一些轻,因为老实说,我想知道为什么它的行为这种方式(最好是一种方法,使之表现得像我希望它)。

Could any Stackoverflow genius shed some light on this since honestly I'd like to know why it's behaving this way (and ideally a way to make it behave like I want it to).

推荐答案

现在,我想我会添加到项目x,以确保这一参考使用项目十,本没复制到其他项目的组件'T发生....所以我尝试设置复制本地设置为true。

您还在谈论Microsoft.SqlServer.Types.dll吧?

You are still talking about the Microsoft.SqlServer.Types.dll right?

我前一段时间也有同样的问题,实际上SQLSERVER类型不应该被复制和再分发与安装。正确的方法为安装它正在下载SQL Server运行时(包括在SQL Server管理工具,这就是为什么你的作品在本地)。

I had the same issues some time ago, actually sqlserver types should not be copied and redistributed with your installation. The correct way to "install" it is downloading the sql server runtime (which is included in the sql server management tools, that's why it works for you locally).

由于这是前一段时间,我不是100%肯定,如果下面的信息是正确的,并会工作,但只是尝试安装的 微软系统CLR类型为Microsoft®SQLServer®上2012 只强。在此下载​​页面扩大安装说明和向下滚动到CLR类型下载...

Because it is some time ago, I'm not 100% sure if the following information is correct and will work, but simply try to install the Microsoft® System CLR Types for Microsoft® SQL Server® 2012 only. On this download page expand Install Instructions and scroll down to the CLR Types download...

使用此链接为SQL Server 2008

在目标服务器上安装该组件。这将只安装运行此类型的dll所需要的东西...

Install this on the target server. This will only install the stuff needed to run this types dll...

这篇关于引用的DLL不beeing复制到引用项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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