I think you need to mark it Content + Copy Always.
Refer to this page for details on the different Visual Studio file properties.
Update 1
Try creating a link to the file in your web application project. You can do this by...
- Right-click your web project (or a folder inside it) using Solution Explorer
- Select Add > Existing Item
- Navigate to your file and select it
- Click the little arrow on the right side of the Add button and choose Add As Link
Update 2
Using Content / Copy Always on any file in a referenced library project should cause the file to be copied to the bin folder of the main project. If the file is in a folder, it will be in that folder in the bin folder.
Make sure that if you are doing a Release build, you are looking bin/Release, and if you are doing a Debug build, you are looking in bin/Debug.
Also, try doing a Rebuild All.
Update 3
I see what you're saying now. When you reference a library DLL that is not in your solution, you are only referencing the DLL, not anything else that is in that project.
So, I think you are going to need to do one of the following...
- Include that project in your solution
- Link to the file (as in Update 1)
- Create a new project called something like
MyLibraryContentFiles
that has only the content files of the library project, but not the code, and include this project in your solution. You might find that separating the content files from the code is advantageous anyway.
- Embed any files you need within the library project (DLL) (using Embedded Resource), then provide a property on a public class that provides some kind of interface for referencing the file. If it's an image file, you could return an
Image
object. If it's a text file, you could return a plain string
.