当应CopyLocal设置为TRUE云服务? [英] When should CopyLocal be set to TRUE on Cloud services?

查看:238
本文介绍了当应CopyLocal设置为TRUE云服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近有这样的issue凡Azure云服务完美工作,当我运行它在我的机器上(使用Azure的仿真器),但运行在Azure上的相同服务时遇到问题。照片 读好几篇文章(如<一后href="http://blogs.technet.com/b/praveenh/archive/2013/04/30/intermittent-quot-http-403-forbidden-quot-error-while-trying-to-browse-to-a-sharepoint-web-app.aspx"相对=nofollow>这个和<一href="https://social.msdn.microsoft.com/Forums/office/en-US/2d5a4339-4de6-478f-acf0-300eb97de632/sharepoint-403-forbidden-error"相对=nofollow>这个)我改变了我的项目要复制的所有引用本地=真,再部署,和它的工作。

I've recently had this issue where an Azure Cloud service worked perfectly when I ran it on my machine (using Azure emulator), but had problems when running the same service on Azure.
After reading quite a few articles (like this and this) I changed ALL the references of my project to Copy Local = true, re-deployed, and it worked.

这让我不知道,何时应该CopyLocal设置为true的云服务?
(不是<一href="http://stackoverflow.com/questions/602765/when-should-copy-local-be-set-to-true-and-when-should-it-not">duplicate,这个问题是云服务)

This made me wonder, when should CopyLocal be set to true on Cloud services?
(not a duplicate, this question is for Cloud services)

在我的情况下,这是一个WorkerRole部署到Azure上,但...
是根据项目的类型,我们正在开发有不同的标准?
它是否改变,如果它的Azure和亚马逊或其他?
是否有额外的开销(或概念上的东西是错误的),如果我们简单地设置复制本地= true来的所有引用?

In my case it was a WorkerRole deployed on Azure, but...
Are there different criteria depending on which type of project we are developing?
Does it change if it's Azure or Amazon or any other?
Is there an additional overhead (or something conceptually wrong) if we simply set Copy Local = true to all references?

在微软文档我发现,在迁移应用程序到云:

In the Microsoft documentation I found that when migrating an application to the cloud:

复制本地属性设置为true所需要的MVC 2,MVC 3,MVC 4,和Silverlight业务应用程序的任何组件。

The Copy Local property is set to true for any assemblies that are required for MVC 2, MVC 3, MVC 4, and Silverlight Business Applications.

但这并不说明我应该设置复制本地忠实于其他引用。
在此先感谢

But this doesn't specify when I should set Copy Local true to other references.
Thanks in advance

推荐答案

有组合件,你应该设置复制本地真。这取决于在你的项目中使用的组件。一般的经验法则是,你应该将该值设置为适用于所有不属于.NET框架和Azure的SDK的一部分的组件(因为他们将是present在你的云服务虚拟机),但你的项目有一个依赖它们。

There is no master list of assemblies for which you should set Copy Local to true. It depends on the assemblies you are using in your project. General rule of thumb is that you should set the value to true for all the assemblies which are not part of .Net Framework and Azure SDK (as they will be present in your Cloud Service VM) but your project has a dependency on them.

这篇关于当应CopyLocal设置为TRUE云服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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