You can create a NuGet package and specify the files you wish to be included in the final nupkg
file.
Go the your .csproj
folder and run nuget spec
. Then modify the resulting projectName.nuspec
file to include a files
section. Here, for example, I've indicated that I want all my txt files from the specified location copied in the target location:
<files>
<file src="headers\*.txt" target="content\headers" />
</files>
The target
location is relative to the packages/nameOfYourDll
and packages
is the folder containing all the dlls
you've downloaded through NuGet.
The next step is to pack your NuGet package with nuget pack projectName.csproj
. This will result in a projectName.nupkg
file. This is what you use to deploy your dll in another project through the NuGet Manager.
You can now either upload your dll to NuGet or copy it into a location on your drive. With this second option, you can then go in Visual Studio in Tools --> Library Package Manager --> Package Manager Settings and select Package Sources from the left menu. You can then add your location where you've saved you nupkg
file.
You can now go and right-click on References in your project and go to Manage NuGet Packages. But instead of searching on nuget.org, you can select your local NuGet 'repository' from the menu on the left. After you install the selected local package, the files from src
will be copied to the target
location and your dll will have access to them. You'll just have to find meaningful paths now.
This answer was given in a hurry, but I can add clarifications if you find it useful.