Situation:
Problem:
This process works fine for an identical setup where some classes in the referenced assembly are referenced directly, as well as loaded by Ninject, so I believe the cause is as follows: If VS detects that no types within a referenced assembly are referred to in code, it won't copy the referenced assembly, even if it's added as a reference with Copy Local = True.
Solution(s):
Can anyone help with the first solution, or suggest another?
If you deploy/copy an application that contains a reference to a custom component that is registered in the GAC, the component will not be deployed/copied with the application, regardless of the Copy Local setting. See MSDN
You have to force copy local to true by adding Private metadata to the GAC assembly reference. Edit your project file and add Private metadata:
<Reference ..>
<Private>True</Private>
</Reference ..>
<ProjectReference ..>
<Private>True</Private>
</ProjectReference ..>
Now your GAC assembly should be copied/dropped from the output folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With