有关依赖(DLL)使用Visual Studio 2013进行部署时不被复制 [英] Relevant dependencies (DLL) not being copied when deploying using Visual Studio 2013

查看:419
本文介绍了有关依赖(DLL)使用Visual Studio 2013进行部署时不被复制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我部署,我引用了正在运行的一些程序(在这种情况下使用发送的SendGrid电子邮件)的照顾我的类库(核心)之一webjobs之一。

In one of the webjobs I'm deploying, I'm referencing one of my class libraries (Core) that is taking care of running some process (in this case sending an email using SendGrid).

当我部署了我webjobs手动(上传.zip文件),一切运行良好。我清理了部署和重新部署使用Visual Studio 2013和webjob开始有问题。这里的主要问题是,它在寻找这是我的核心类库,而不是我的控制台应用程序中引用的DLL SendGrid,它不是finiding它抛出以下错误:

When I deployed my webjobs manually (uploading .zip file) everything worked fine. I cleaned up the deployment and re-deployed using Visual Studio 2013 and the webjob started to have problems. The main issue here is that it's looking for the SendGrid dll that's referenced by my Core class library and not my Console app and it's not finiding it throwing the following error:

未处理的异常:System.IO.FileLoadException:无法加载文件或程序集SendGrid ....版本= 4.5.0.0,文化=中性公钥= 30ad4fe6b2a6aeed或它的一个依赖的位于集清单定义不匹配的程序集引用(从HRESULT异常:0x80131040)。

"Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'SendGrid.... Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

我FTP'd到网站后发现,有效地SendGrid装配不到哪我WebJob是。

I FTP'd into the website and found that effectively the SendGrid assembly is not where my WebJob is at.

我的问题是:有没有办法迫使这依赖被复制到正确的目录使用进行部署时VS 2013

My question is: is there a way to force that this dependencies get copied to the right directory when deploying using VS 2013?

谢谢,

推荐答案

我是谁把WebJobs工具列于2013年夏季更新团队的一员,我可以让你知道我们已经意识到这个问题,并在它的修复下一次更新,这是很快出来了检查。与此同时,解决办法是设置为您所需要的组件的集的引用 - 中的NuGet包单独会做解决这个问题的 - 并重新发布。实际上,我们使用的NuGet包做我们的部署逻辑中WebJobs VS.当我们发布更新,我们还会发布的NuGet(这是通过最后的测试现在打算),所以在夏季的客户的秋季更新将有这个问题缓解。

I'm a member of the team who put the WebJobs tooling out in the Summer 2013 Update, and I can let you know we're aware of this issue and have checked in a fix for it for the next update, which is coming out soon. In the meantime, the workaround is to set assembly references to the assemblies you need - the NuGet packages alone will do solve this issue - and re-publish. We actually use a NuGet package to do our deployment logic for WebJobs within VS. Once we release the update, we'll also release the NuGet (which is going through final testing now), so customers on the Summer and Fall updates will have this issue mitigated.

这篇关于有关依赖(DLL)使用Visual Studio 2013进行部署时不被复制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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