Question

I had a problem, as described here, which led me to using a single, common output directory for the built solution. For example, all release builds output as follows:

<OutputPath>$(SolutionDir)BuildOutput\Release\</OutputPath>

I have also set Copy Local to false as this is not necessary with the common build location (it also slows down the build process significantly).

My problem now is when I publish a project to an Azure Web Role using the cloud project, only the assemblies which have Copy Local set to true are published. None of the referenced projects' DLLs are published to the web role.

Thus I am getting exceptions such as:

Could not load file or assembly 'MyClassLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

How do I get the cloud project to publish referenced projects which have Copy Local set to false?

Note: I am using VS 2013.

Was it helpful?

Solution

All non-GAC assemblies you reference in your projects need to have Copy Local set to true in order to be included in the package you deploy to the Cloud Service.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top