When should CopyLocal be set to TRUE on Cloud services?

ⅰ亾dé卋堺 提交于 2020-01-05 04:04:20

问题


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.

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

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:

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


回答1:


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.



来源:https://stackoverflow.com/questions/32785383/when-should-copylocal-be-set-to-true-on-cloud-services

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!