0

I've create Azure Worker Role. This Azure Worker Role service has a sub-folder which will contain extra dlls that are loaded dynamically with MEF at the run-time. Initially the sub-folder empty but it get populated when compiling other projects, since their build output folder is the sub-folder of the service. When I publish the worker role, it doesn't not include the extra dlls which the other projects copied in service sub-folder.

How do I include these dlls in the worker role package sub-folder?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
asahaf
  • 49
  • 2
  • 5
  • Have you set `copy local` = true for the subfolder? – David Makogon Jan 21 '17 at 13:12
  • there is no such option for folders! – asahaf Jan 21 '17 at 15:05
  • No need to yell, when people are trying to help. Maybe trying a post-build event? Plenty of post-build questions already asked (and answered) on StackOverflow. A quick search should bring those up for you (and possibly make this question a duplicate). – David Makogon Jan 21 '17 at 15:08
  • thank you. I'm not yelling :) I just didn't find the option – asahaf Jan 21 '17 at 15:11
  • If I understood your scenario correctly, you have decoupled your libs from your Startup project, and when you build the startup project, the extra projects can't be complied into the specific folder within your startup project. You could try to right click your startup project, select "Build Dependencies > Project Dependencies", choose the extra lib projects and click “OK” without referencing your extra lib projects directly. – Bruce Chen Jan 23 '17 at 10:02

1 Answers1

1

I followed this Simple Calculator MEF Application to build my MEF applicaiton. And I moved Interface to a class library named ISimpleCalculator, here is the structure of my project:

Note: The Extensions folder is used to store the extra libs. And the project ExtendedOperations would be compiled into Extensions folder in the root of project SimpleCalculator3. Also, there is no any direct reference between ExtendedOperations and SimpleCalculator3.

When building SimpleCalculator3, ExtendedOperations would not be compiled. But when right click the startup project, select "Build Dependencies > Project Dependencies", choose the extra lib projects and click “OK” as follows:

Upon the configuration, ExtendedOperations could be compiled into Extensions folder when launching SimpleCalculator3, and the new feature from ExtendedOperations would take effect. Additionally, there is a similar issue, you could refer to it.

Community
  • 1
  • 1
Bruce Chen
  • 18,207
  • 2
  • 21
  • 35