简体   繁体   中英

When should CopyLocal be set to TRUE on Cloud services?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM