即使复制本地集,Azure 包也不包括链接项目 DLL [英] Azure package not including linked project DLL even with copy local set

查看:16
本文介绍了即使复制本地集,Azure 包也不包括链接项目 DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含 4 个项目的 Azure 解决方案.(Windows 8 上的 VS 2012,Azure 工具 1.8)

I've an Azure solution with 4 projects in it. (VS 2012 on Windows 8, Azure Tools 1.8)

  1. 具有通用代码的核心项目
  2. 网络角色前端
  3. 服务数据的服务角色(来自 SQL Azure DB)
  4. 计划任务的工作角色

所有角色项目都使用 copy local = true... 标准内容引用核心项目.

All role projects have a reference to the core project with copy local = true... standard stuff.

网络角色和辅助角色工作正常,但我的服务角色一直卡在初始化 - 启动 - 回收循环中.当我浏览到该服务时,我得到 Could note load file or assembly FileNotFoundException.果然,RDP到服务器和DLL不见了.

The web role and the worker role work fine, but my service role keeps getting stuck in the Initializing - Starting - Recycling loop. When I browse to the service I get the Could note load file or assembly FileNotFoundException. Sure enough, RDP to the server and the DLL is missing.

在本地查看包文件,其他角色包括缺少的 DLL,但不包括服务角色.

Having a look in the package files locally, the other roles include the missing DLL, but not the service role.

如果我使用VS发布服务角色(不是azure发布)到本地文件系统,核心DLL包含的,证明VS设置对于复制本地是正确的.

If I use VS to publish the service role (not azure publish) to local file system, the core DLL is included, proving that the VS settings are correct for the copy local.

在 VS 中是否有任何其他方式来影响添加到 Azure 部署包中的文件,或者是否有一种简单的方法可以在不使用 VS 的情况下编写包的创建脚本?

Is there any other way from within VS to influence the files that are added to the Azure deployment package, or is there a simple way to script the creation of the package without using VS?

推荐答案

正如我在评论中所写,我的情况和你一样(Windows 7 和 8,VS 2012,Azure SDK 1.8).Copy Local 设置为 true 但是当我打开 *.cspkg 包时,approot 文件夹中缺少引用的程序集.我做了什么,我创建了新的 Worker Role 项目并从旧项目中复制了代码.现在包括所有程序集.

As I wrote in comment I have same situation as you (Windows 7 and 8, VS 2012, Azure SDK 1.8). Copy Local is set to true but when I open *.cspkg package, referenced assemblies are missing in approot folder. What I did I created new Worker Role project and copied the code from old one. Now are all assemblies included.

更新:在我的情况下,上述解决方案并不是真正必要的.我真正的问题是我的 Web 角色不小心引用了我的 Worker Role 程序集.当我删除这个不必要的引用时,工作角色获得了包中的所有程序集.在我看来,这种行为是错误的.

UPDATE: The solution described above was not really necessary in my case. The real problem by me was that my Web Role accidentally referenced my Worker Role assembly. When I removed this unnecessary reference, the Worker Role got the all assemblies in package. This behaviour is, on my opinion, buggy.

这篇关于即使复制本地集,Azure 包也不包括链接项目 DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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