Visual studio not copying content files from indirectly referenced project
Add Library1 reference to the Executable project.
EDIT:
You can put all content in a separate project, set all its entries to "content" and "copy always" and reference that project from External and Executable
-
IMO you're looking for embedded resource, not for content files.
When you compile Library 1 the content files are placed in its bin folder. When Library 2 is compiled the compiler recognizes referenced code and includes it (Library 1.dll) but the content files aren't recognized since they aren't mentioned anywhere in Library 2. The same goes when linking Library 2 to the executable.
If your content files are relatively small (icons, templates etc) and you don't envision need to edit them if you were to lose the source code then you can embed them as resources and provide a public method to return the contents, such as:
public static Stream GetResourceContent(string rName){
string resName = System.Reflection.Assembly
.GetExecutingAssembly().GetManifestResourceNames()
.FirstOrDefault(rn => rn.EndsWith("."+rName));
if(resName!=null)
return System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(resName);
else
return null;
}
If your content is bound to change, such as templates etc, then consider including a copy with the executable project